summaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/compact_vector
diff options
context:
space:
mode:
authorAnton Samokhvalov <[email protected]>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/containers/compact_vector
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
Restoring authorship annotation for Anton Samokhvalov <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers/compact_vector')
-rw-r--r--library/cpp/containers/compact_vector/compact_vector.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/containers/compact_vector/compact_vector.h b/library/cpp/containers/compact_vector/compact_vector.h
index dbe7473f0cc..9e379385464 100644
--- a/library/cpp/containers/compact_vector/compact_vector.h
+++ b/library/cpp/containers/compact_vector/compact_vector.h
@@ -24,11 +24,11 @@ private:
T* Ptr;
THeader* Header() {
- return ((THeader*)Ptr) - 1;
+ return ((THeader*)Ptr) - 1;
}
const THeader* Header() const {
- return ((THeader*)Ptr) - 1;
+ return ((THeader*)Ptr) - 1;
}
public:
@@ -40,8 +40,8 @@ public:
TCompactVector()
: Ptr(nullptr)
- {
- }
+ {
+ }
TCompactVector(const TThis& that)
: Ptr(nullptr)
@@ -105,7 +105,7 @@ public:
void* mem = ::malloc(sizeof(THeader) + newCapacity * sizeof(T));
if (mem == nullptr)
ythrow yexception() << "out of memory";
- Ptr = (T*)(((THeader*)mem) + 1);
+ Ptr = (T*)(((THeader*)mem) + 1);
Header()->Size = 0;
Header()->Capacity = newCapacity;
} else {
@@ -197,12 +197,12 @@ public:
Clear();
}
- T& operator[](size_t index) {
+ T& operator[](size_t index) {
Y_ASSERT(index < Size());
return Ptr[index];
}
- const T& operator[](size_t index) const {
+ const T& operator[](size_t index) const {
Y_ASSERT(index < Size());
return Ptr[index];
}