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 | 135b277c8122a631eadd1af0af8a69ed972fdf7b (patch) | |
tree | 0b1c946d0c519b2dfc6a45d569daeefbf6c293c3 /library/cpp/yt | |
parent | e7c30eecd571c69c5b7395fd66ff676f65f93cc7 (diff) | |
download | ydb-135b277c8122a631eadd1af0af8a69ed972fdf7b.tar.gz |
Restoring authorship annotation for <acid@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yt')
-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 e6d64fec18..4844027f9d 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 b683615b83..cd576e5c5d 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 2d94b5701b..eefc5a9a71 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 ec4ba3526a..f16a24d5d0 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 5484d4a216..e24855e0e2 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>> |