diff options
author | acid <acid@yandex-team.ru> | 2022-02-10 16:50:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:48 +0300 |
commit | e55e35630443fbd1ab23fc2734140a9e06509073 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 | |
parent | 135b277c8122a631eadd1af0af8a69ed972fdf7b (diff) | |
download | ydb-e55e35630443fbd1ab23fc2734140a9e06509073.tar.gz |
Restoring authorship annotation for <acid@yandex-team.ru>. Commit 2 of 2.
-rw-r--r-- | library/cpp/yt/memory/ref_counted-inl.h | 20 | ||||
-rw-r--r-- | library/cpp/yt/memory/ref_counted.h | 8 | ||||
-rw-r--r-- | library/cpp/yt/misc/guid-inl.h | 8 | ||||
-rw-r--r-- | library/cpp/yt/misc/guid.h | 6 | ||||
-rw-r--r-- | library/cpp/yt/string/format-inl.h | 34 |
5 files changed, 38 insertions, 38 deletions
diff --git a/library/cpp/yt/memory/ref_counted-inl.h b/library/cpp/yt/memory/ref_counted-inl.h index 4844027f9d..e6d64fec18 100644 --- a/library/cpp/yt/memory/ref_counted-inl.h +++ b/library/cpp/yt/memory/ref_counted-inl.h @@ -1,13 +1,13 @@ -#ifndef REF_COUNTED_INL_H_ -#error "Direct inclusion of this file is not allowed, include ref_counted.h" +#ifndef REF_COUNTED_INL_H_ +#error "Direct inclusion of this file is not allowed, include ref_counted.h" // For the sake of sane code completion. #include "ref_counted.h" -#endif - -namespace NYT { - -//////////////////////////////////////////////////////////////////////////////// - +#endif + +namespace NYT { + +//////////////////////////////////////////////////////////////////////////////// + constexpr uint16_t PtrBits = 48; constexpr uintptr_t PtrMask = (1ULL << PtrBits) - 1; @@ -35,7 +35,7 @@ Y_FORCE_INLINE TPackedPointer<T> UnpackPointer(void* packedPtr) template <class T, class = void> struct TMemoryReleaser -{ +{ static void Do(void* ptr, uint16_t /*offset*/) { TFreeMemory<T>::Do(ptr); @@ -275,4 +275,4 @@ void TRefCounted::DestroyRefCountedImpl(T* ptr) //////////////////////////////////////////////////////////////////////////////// -} // namespace NYT +} // namespace NYT diff --git a/library/cpp/yt/memory/ref_counted.h b/library/cpp/yt/memory/ref_counted.h index cd576e5c5d..b683615b83 100644 --- a/library/cpp/yt/memory/ref_counted.h +++ b/library/cpp/yt/memory/ref_counted.h @@ -183,8 +183,8 @@ using TRefCountedPtr = TIntrusivePtr<TRefCounted>; //////////////////////////////////////////////////////////////////////////////// -} // namespace NYT +} // namespace NYT -#define REF_COUNTED_INL_H_ -#include "ref_counted-inl.h" -#undef REF_COUNTED_INL_H_ +#define REF_COUNTED_INL_H_ +#include "ref_counted-inl.h" +#undef REF_COUNTED_INL_H_ diff --git a/library/cpp/yt/misc/guid-inl.h b/library/cpp/yt/misc/guid-inl.h index eefc5a9a71..2d94b5701b 100644 --- a/library/cpp/yt/misc/guid-inl.h +++ b/library/cpp/yt/misc/guid-inl.h @@ -26,10 +26,10 @@ Y_FORCE_INLINE bool TGuid::IsEmpty() const } Y_FORCE_INLINE TGuid::operator bool() const -{ - return !IsEmpty(); -} - +{ + return !IsEmpty(); +} + //////////////////////////////////////////////////////////////////////////////// Y_FORCE_INLINE bool operator == (TGuid lhs, TGuid rhs) diff --git a/library/cpp/yt/misc/guid.h b/library/cpp/yt/misc/guid.h index f16a24d5d0..ec4ba3526a 100644 --- a/library/cpp/yt/misc/guid.h +++ b/library/cpp/yt/misc/guid.h @@ -59,9 +59,9 @@ struct TGuid //! Checks if TGuid is zero. bool IsEmpty() const; - //! Converts TGuid to bool, returns |false| iff TGuid is zero. - explicit operator bool() const; - + //! Converts TGuid to bool, returns |false| iff TGuid is zero. + explicit operator bool() const; + //! Creates a new instance. static TGuid Create(); diff --git a/library/cpp/yt/string/format-inl.h b/library/cpp/yt/string/format-inl.h index e24855e0e2..5484d4a216 100644 --- a/library/cpp/yt/string/format-inl.h +++ b/library/cpp/yt/string/format-inl.h @@ -377,27 +377,27 @@ struct TValueFormatter<THashMultiMap<K, V>> } }; -// TEnumIndexedVector +// TEnumIndexedVector template <class E, class T> struct TValueFormatter<TEnumIndexedVector<E, T>> -{ +{ static void Do(TStringBuilderBase* builder, const TEnumIndexedVector<E, T>& collection, TStringBuf format) - { - builder->AppendChar('{'); - bool firstItem = true; - for (const auto& index : TEnumTraits<E>::GetDomainValues()) { - if (!firstItem) { - builder->AppendString(DefaultJoinToStringDelimiter); - } + { + builder->AppendChar('{'); + bool firstItem = true; + for (const auto& index : TEnumTraits<E>::GetDomainValues()) { + if (!firstItem) { + builder->AppendString(DefaultJoinToStringDelimiter); + } FormatValue(builder, index, format); - builder->AppendString(": "); - FormatValue(builder, collection[index], format); - firstItem = false; - } - builder->AppendChar('}'); - } -}; - + builder->AppendString(": "); + FormatValue(builder, collection[index], format); + firstItem = false; + } + builder->AppendChar('}'); + } +}; + // std::pair template <class T1, class T2> struct TValueFormatter<std::pair<T1, T2>> |