aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt
diff options
context:
space:
mode:
authorbulatman <bulatman@yandex-team.ru>2022-02-10 16:45:50 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:50 +0300
commit2f6ca198245aeffd5e2d82b65927c2465b68b4f5 (patch)
tree9142afc54d335ea52910662635b898e79e192e49 /library/cpp/yt
parent6560e4993b14d193f8c879e33a3de5e5eba6e21d (diff)
downloadydb-2f6ca198245aeffd5e2d82b65927c2465b68b4f5.tar.gz
Restoring authorship annotation for <bulatman@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yt')
-rw-r--r--library/cpp/yt/memory/intrusive_ptr.h112
-rw-r--r--library/cpp/yt/memory/ref_counted-inl.h10
-rw-r--r--library/cpp/yt/memory/ref_counted.h6
3 files changed, 64 insertions, 64 deletions
diff --git a/library/cpp/yt/memory/intrusive_ptr.h b/library/cpp/yt/memory/intrusive_ptr.h
index 6aa0f0dc90..3dead7db1d 100644
--- a/library/cpp/yt/memory/intrusive_ptr.h
+++ b/library/cpp/yt/memory/intrusive_ptr.h
@@ -223,38 +223,38 @@ Y_FORCE_INLINE TIntrusivePtr<T> DangerousGetPtr(T* object)
////////////////////////////////////////////////////////////////////////////////
-template <class T, class U>
-TIntrusivePtr<T> StaticPointerCast(const TIntrusivePtr<U>& ptr)
-{
- return {static_cast<T*>(ptr.Get())};
-}
-
-template <class T, class U>
-TIntrusivePtr<T> StaticPointerCast(TIntrusivePtr<U>&& ptr)
-{
- return {static_cast<T*>(ptr.Release()), false};
-}
-
-template <class T, class U>
-TIntrusivePtr<T> ConstPointerCast(const TIntrusivePtr<U>& ptr)
-{
- return {const_cast<T*>(ptr.Get())};
-}
-
-template <class T, class U>
-TIntrusivePtr<T> ConstPointerCast(TIntrusivePtr<U>&& ptr)
-{
- return {const_cast<T*>(ptr.Release()), false};
-}
-
-template <class T, class U>
-TIntrusivePtr<T> DynamicPointerCast(const TIntrusivePtr<U>& ptr)
-{
- return {dynamic_cast<T*>(ptr.Get())};
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
+template <class T, class U>
+TIntrusivePtr<T> StaticPointerCast(const TIntrusivePtr<U>& ptr)
+{
+ return {static_cast<T*>(ptr.Get())};
+}
+
+template <class T, class U>
+TIntrusivePtr<T> StaticPointerCast(TIntrusivePtr<U>&& ptr)
+{
+ return {static_cast<T*>(ptr.Release()), false};
+}
+
+template <class T, class U>
+TIntrusivePtr<T> ConstPointerCast(const TIntrusivePtr<U>& ptr)
+{
+ return {const_cast<T*>(ptr.Get())};
+}
+
+template <class T, class U>
+TIntrusivePtr<T> ConstPointerCast(TIntrusivePtr<U>&& ptr)
+{
+ return {const_cast<T*>(ptr.Release()), false};
+}
+
+template <class T, class U>
+TIntrusivePtr<T> DynamicPointerCast(const TIntrusivePtr<U>& ptr)
+{
+ return {dynamic_cast<T*>(ptr.Get())};
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
template <class T>
bool operator<(const TIntrusivePtr<T>& lhs, const TIntrusivePtr<T>& rhs)
{
@@ -321,30 +321,30 @@ bool operator!=(T* lhs, const TIntrusivePtr<U>& rhs)
return lhs != rhs.Get();
}
-template <class T>
-bool operator==(std::nullptr_t, const TIntrusivePtr<T>& rhs)
-{
- return nullptr == rhs.Get();
-}
-
-template <class T>
-bool operator!=(std::nullptr_t, const TIntrusivePtr<T>& rhs)
-{
- return nullptr != rhs.Get();
-}
-
-template <class T>
-bool operator==(const TIntrusivePtr<T>& lhs, std::nullptr_t)
-{
- return nullptr == lhs.Get();
-}
-
-template <class T>
-bool operator!=(const TIntrusivePtr<T>& lhs, std::nullptr_t)
-{
- return nullptr != lhs.Get();
-}
-
+template <class T>
+bool operator==(std::nullptr_t, const TIntrusivePtr<T>& rhs)
+{
+ return nullptr == rhs.Get();
+}
+
+template <class T>
+bool operator!=(std::nullptr_t, const TIntrusivePtr<T>& rhs)
+{
+ return nullptr != rhs.Get();
+}
+
+template <class T>
+bool operator==(const TIntrusivePtr<T>& lhs, std::nullptr_t)
+{
+ return nullptr == lhs.Get();
+}
+
+template <class T>
+bool operator!=(const TIntrusivePtr<T>& lhs, std::nullptr_t)
+{
+ return nullptr != lhs.Get();
+}
+
////////////////////////////////////////////////////////////////////////////////
} //namespace NYT
diff --git a/library/cpp/yt/memory/ref_counted-inl.h b/library/cpp/yt/memory/ref_counted-inl.h
index 89894619bd..e6d64fec18 100644
--- a/library/cpp/yt/memory/ref_counted-inl.h
+++ b/library/cpp/yt/memory/ref_counted-inl.h
@@ -143,7 +143,7 @@ struct TRefCountedHelper
return reinterpret_cast<const TRefCounter*>(obj) - 1;
}
- Y_FORCE_INLINE static void Destroy(const T* obj)
+ Y_FORCE_INLINE static void Destroy(const T* obj)
{
auto* refCounter = GetRefCounter(obj);
@@ -163,7 +163,7 @@ struct TRefCountedHelper
}
}
- Y_FORCE_INLINE static void Deallocate(const T* obj)
+ Y_FORCE_INLINE static void Deallocate(const T* obj)
{
char* ptr = reinterpret_cast<char*>(const_cast<TRefCounter*>(GetRefCounter(obj)));
TMemoryReleaser<T>::Do(ptr - RefCounterOffset, RefCounterSpace);
@@ -196,19 +196,19 @@ struct TRefCountedHelper<T, true>
////////////////////////////////////////////////////////////////////////////////
template <class T>
-Y_FORCE_INLINE const TRefCounter* GetRefCounter(const T* obj)
+Y_FORCE_INLINE const TRefCounter* GetRefCounter(const T* obj)
{
return TRefCountedHelper<T>::GetRefCounter(obj);
}
template <class T>
-Y_FORCE_INLINE void DestroyRefCounted(const T* obj)
+Y_FORCE_INLINE void DestroyRefCounted(const T* obj)
{
TRefCountedHelper<T>::Destroy(obj);
}
template <class T>
-Y_FORCE_INLINE void DeallocateRefCounted(const T* obj)
+Y_FORCE_INLINE void DeallocateRefCounted(const T* obj)
{
TRefCountedHelper<T>::Deallocate(obj);
}
diff --git a/library/cpp/yt/memory/ref_counted.h b/library/cpp/yt/memory/ref_counted.h
index 2443675def..b683615b83 100644
--- a/library/cpp/yt/memory/ref_counted.h
+++ b/library/cpp/yt/memory/ref_counted.h
@@ -90,13 +90,13 @@ private:
////////////////////////////////////////////////////////////////////////////////
template <class T>
-const TRefCounter* GetRefCounter(const T* obj);
+const TRefCounter* GetRefCounter(const T* obj);
template <class T>
-void DestroyRefCounted(const T* obj);
+void DestroyRefCounted(const T* obj);
template <class T>
-void DeallocateRefCounted(const T* obj);
+void DeallocateRefCounted(const T* obj);
////////////////////////////////////////////////////////////////////////////////