mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
CC
This commit is contained in:
parent
2b9909d396
commit
84b88c6802
@ -244,7 +244,7 @@ public:
|
||||
if (whence == SEEK_CUR)
|
||||
{
|
||||
/// 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_;
|
||||
return getPosition();
|
||||
@ -257,7 +257,7 @@ public:
|
||||
else if (whence == SEEK_SET)
|
||||
{
|
||||
/// 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)
|
||||
{
|
||||
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)
|
||||
next_callback(count());
|
||||
if (working_buffer.size())
|
||||
if (!working_buffer.empty())
|
||||
impl->position() = position();
|
||||
if (!impl->next())
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user