mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
CC
This commit is contained in:
parent
2b9909d396
commit
84b88c6802
@ -244,7 +244,7 @@ public:
|
|||||||
if (whence == SEEK_CUR)
|
if (whence == SEEK_CUR)
|
||||||
{
|
{
|
||||||
/// If position within current working buffer - shift pos.
|
/// If position within current working buffer - shift pos.
|
||||||
if (working_buffer.size() && size_t(getPosition() + offset_) < absolute_position)
|
if (!working_buffer.empty() && size_t(getPosition() + offset_) < absolute_position)
|
||||||
{
|
{
|
||||||
pos += offset_;
|
pos += offset_;
|
||||||
return getPosition();
|
return getPosition();
|
||||||
@ -257,7 +257,7 @@ public:
|
|||||||
else if (whence == SEEK_SET)
|
else if (whence == SEEK_SET)
|
||||||
{
|
{
|
||||||
/// If position within current working buffer - shift pos.
|
/// If position within current working buffer - shift pos.
|
||||||
if (working_buffer.size() && size_t(offset_) >= absolute_position - working_buffer.size()
|
if (!working_buffer.empty() && size_t(offset_) >= absolute_position - working_buffer.size()
|
||||||
&& size_t(offset_) < absolute_position)
|
&& size_t(offset_) < absolute_position)
|
||||||
{
|
{
|
||||||
pos = working_buffer.end() - (absolute_position - offset_);
|
pos = working_buffer.end() - (absolute_position - offset_);
|
||||||
|
@ -76,9 +76,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~UpdatableSessionBase()
|
virtual ~UpdatableSessionBase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -205,7 +203,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
if (next_callback)
|
if (next_callback)
|
||||||
next_callback(count());
|
next_callback(count());
|
||||||
if (working_buffer.size())
|
if (!working_buffer.empty())
|
||||||
impl->position() = position();
|
impl->position() = position();
|
||||||
if (!impl->next())
|
if (!impl->next())
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user