diff options
author | sabdenovch <sabdenovch@yandex-team.com> | 2023-10-30 12:19:43 +0300 |
---|---|---|
committer | sabdenovch <sabdenovch@yandex-team.com> | 2023-10-30 13:08:44 +0300 |
commit | 2e586dca07bb03ab37a2436bc3ce89660f3320bc (patch) | |
tree | 9914990d3daf4e8c905cceaccd79cca27e3731e1 | |
parent | 9b38ccc7db572f6cd60c5489991e4361f114cbd7 (diff) | |
download | ydb-2e586dca07bb03ab37a2436bc3ce89660f3320bc.tar.gz |
Pass by const reference + copy changed into pass by value + move for TQueryStatistics
-rw-r--r-- | yt/yt/client/query_client/query_statistics.cpp | 4 | ||||
-rw-r--r-- | yt/yt/client/query_client/query_statistics.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/yt/yt/client/query_client/query_statistics.cpp b/yt/yt/client/query_client/query_statistics.cpp index ac9e1349ef5..fd2b30b651e 100644 --- a/yt/yt/client/query_client/query_statistics.cpp +++ b/yt/yt/client/query_client/query_statistics.cpp @@ -13,12 +13,12 @@ using NYT::FromProto; //////////////////////////////////////////////////////////////////////////////// -void TQueryStatistics::AddInnerStatistics(const TQueryStatistics& statistics) +void TQueryStatistics::AddInnerStatistics(TQueryStatistics statistics) { - InnerStatistics.push_back(statistics); IncompleteInput |= statistics.IncompleteInput; IncompleteOutput |= statistics.IncompleteOutput; MemoryUsage = std::max(MemoryUsage, statistics.MemoryUsage); + InnerStatistics.push_back(std::move(statistics)); } //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/client/query_client/query_statistics.h b/yt/yt/client/query_client/query_statistics.h index daf81cddf07..7f9464e5612 100644 --- a/yt/yt/client/query_client/query_statistics.h +++ b/yt/yt/client/query_client/query_statistics.h @@ -26,7 +26,7 @@ struct TQueryStatistics std::vector<TQueryStatistics> InnerStatistics; - void AddInnerStatistics(const TQueryStatistics& statistics); + void AddInnerStatistics(TQueryStatistics statistics); }; void ToProto(NProto::TQueryStatistics* serialized, const TQueryStatistics& original); |