aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornadya02 <nadya02@yandex-team.com>2024-07-23 16:03:19 +0300
committernadya02 <nadya02@yandex-team.com>2024-07-23 16:27:59 +0300
commitce74038e986d1eb5b51b681d3d9cdbd26b495bc3 (patch)
tree5cc2bd4021840d389799a84c1b24b2aa029475cc
parentb10aca4d87cc7e999bc0aeedcf98e8293972ff0a (diff)
downloadydb-ce74038e986d1eb5b51b681d3d9cdbd26b495bc3.tar.gz
Cosmetic
fix 686472cd2cbcf22eccabfb37c4a7ef91216bafd4
-rw-r--r--yt/yt/core/misc/memory_usage_tracker.cpp4
-rw-r--r--yt/yt/core/test_framework/test_memory_tracker.cpp2
-rw-r--r--yt/yt/core/test_framework/test_memory_tracker.h1
3 files changed, 4 insertions, 3 deletions
diff --git a/yt/yt/core/misc/memory_usage_tracker.cpp b/yt/yt/core/misc/memory_usage_tracker.cpp
index e81a120a6f..269632e4fe 100644
--- a/yt/yt/core/misc/memory_usage_tracker.cpp
+++ b/yt/yt/core/misc/memory_usage_tracker.cpp
@@ -369,7 +369,7 @@ TErrorOr<TSharedRef> TryTrackMemory(
if (!tracker || !reference) {
return reference;
}
- return tracker->TryTrack(reference, keepExistingTracking);
+ return tracker->TryTrack(std::move(reference), keepExistingTracking);
}
TSharedRef TrackMemory(
@@ -380,7 +380,7 @@ TSharedRef TrackMemory(
if (!tracker || !reference) {
return reference;
}
- return tracker->Track(reference, keepExistingTracking);
+ return tracker->Track(std::move(reference), keepExistingTracking);
}
TSharedRefArray TrackMemory(
diff --git a/yt/yt/core/test_framework/test_memory_tracker.cpp b/yt/yt/core/test_framework/test_memory_tracker.cpp
index c491fd3e1c..3ab4c8d627 100644
--- a/yt/yt/core/test_framework/test_memory_tracker.cpp
+++ b/yt/yt/core/test_framework/test_memory_tracker.cpp
@@ -131,7 +131,7 @@ TErrorOr<TSharedRef> TTestNodeMemoryTracker::TryTrack(
TSharedRef reference,
bool keepHolder)
{
- return Track(reference, keepHolder);
+ return Track(std::move(reference), keepHolder);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/test_framework/test_memory_tracker.h b/yt/yt/core/test_framework/test_memory_tracker.h
index 7308eb2a9d..b654ef300f 100644
--- a/yt/yt/core/test_framework/test_memory_tracker.h
+++ b/yt/yt/core/test_framework/test_memory_tracker.h
@@ -37,6 +37,7 @@ public:
TErrorOr<TSharedRef> TryTrack(
TSharedRef reference,
bool keepHolder = false) override;
+
private:
class TTestTrackedReferenceHolder