diff options
| author | babenko <[email protected]> | 2025-08-01 11:35:13 +0300 |
|---|---|---|
| committer | babenko <[email protected]> | 2025-08-01 11:50:44 +0300 |
| commit | a4d63b4447db7ef4b7968768986871bd8b803429 (patch) | |
| tree | de85a867bb8a938a6223a99759f66437e2e072af /library/cpp/yt/memory/ref.cpp | |
| parent | 99ac9785a99d000f2cfb74588d59bfd8249a78bd (diff) | |
Introduce TSharedRefArray::AreBitwiseEqual
commit_hash:d20246c9bd65274bc0b78b3c1cbc0cfcd5303d10
Diffstat (limited to 'library/cpp/yt/memory/ref.cpp')
| -rw-r--r-- | library/cpp/yt/memory/ref.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/library/cpp/yt/memory/ref.cpp b/library/cpp/yt/memory/ref.cpp index 7863d7b41d3..cafa276d013 100644 --- a/library/cpp/yt/memory/ref.cpp +++ b/library/cpp/yt/memory/ref.cpp @@ -429,6 +429,21 @@ TSharedRefArray TSharedRefArray::MakeCopy( return builder.Finish(); } +bool TSharedRefArray::AreBitwiseEqual( + const TSharedRefArray& lhs, + const TSharedRefArray& rhs) +{ + if (lhs.Size() != rhs.Size()) { + return false; + } + for (size_t index = 0; index < lhs.Size(); ++index) { + if (TRef::AreBitwiseEqual(lhs[index], rhs[index])) { + return false; + } + } + return true; +} + //////////////////////////////////////////////////////////////////////////////// TSharedRefArrayBuilder::TSharedRefArrayBuilder( |
