aboutsummaryrefslogtreecommitdiffstats
path: root/util/memory/segmented_string_pool.h
diff options
context:
space:
mode:
authorstanly <stanly@yandex-team.ru>2022-02-10 16:46:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:49 +0300
commitcde218e65dfef5ce03a48d641fd8f7913cf17b2d (patch)
treed3349caea4095825a55b5ba24fe758067b29ce6f /util/memory/segmented_string_pool.h
parent9f813499b4ef585cb3c2bb93de93ef003daf4fc4 (diff)
downloadydb-cde218e65dfef5ce03a48d641fd8f7913cf17b2d.tar.gz
Restoring authorship annotation for <stanly@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/memory/segmented_string_pool.h')
-rw-r--r--util/memory/segmented_string_pool.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/memory/segmented_string_pool.h b/util/memory/segmented_string_pool.h
index a40aa408f5..c02b28606b 100644
--- a/util/memory/segmented_string_pool.h
+++ b/util/memory/segmented_string_pool.h
@@ -1,6 +1,6 @@
#pragma once
-#include <util/system/align.h>
+#include <util/system/align.h>
#include <util/system/yassert.h>
#include <util/system/defaults.h>
#include <util/generic/noncopyable.h>
@@ -95,9 +95,9 @@ public:
curseg->freepos += last_ins_size, last_free -= 1;
return (T*)rv;
}
- size_t get_segment_size() const {
- return segment_size;
- }
+ size_t get_segment_size() const {
+ return segment_size;
+ }
bool contains(const T* ptr) const {
for (seg_const_iterator i = segs.begin(), ie = segs.end(); i != ie; ++i)
if ((char*)ptr >= (char*)i->data && (char*)ptr < (char*)i->data + i->freepos)
@@ -186,9 +186,9 @@ public:
template <typename T, typename C>
inline T* pool_push(segmented_pool<C>& pool, const T* v) {
- static_assert(sizeof(C) == 1, "only char type supported");
+ static_assert(sizeof(C) == 1, "only char type supported");
size_t len = SizeOf(v);
- C* buf = pool.append(nullptr, AlignUp(len));
+ C* buf = pool.append(nullptr, AlignUp(len));
memcpy(buf, v, len);
return (T*)buf;
}