mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
+PODArray::resize_assume_reserved
This commit is contained in:
parent
7039a8b883
commit
771dada9c0
@ -187,7 +187,7 @@ public:
|
||||
res_offsets.push_back(current_offset);
|
||||
|
||||
const auto chars_size_old = res_chars.size();
|
||||
res_chars.resize(chars_size_old + size);
|
||||
res_chars.resize_assume_reserved(chars_size_old + size);
|
||||
memcpy(&res_chars[chars_size_old], &chars[offset], size);
|
||||
};
|
||||
|
||||
|
@ -211,6 +211,11 @@ public:
|
||||
void resize(size_t n)
|
||||
{
|
||||
reserve(n);
|
||||
resize_assume_reserved(n);
|
||||
}
|
||||
|
||||
void resize_assume_reserved(const size_t n)
|
||||
{
|
||||
c_end = c_start + byte_size(n);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user