This is an automated email from the ASF dual-hosted git repository.
hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 34007db3 chore: remove need for the intermediate variable in Size
function (#2810)
34007db3 is described below
commit 34007db3a5a74e7c773209a16c6d0a5cc09ef884
Author: Anirudh Lakhanpal <[email protected]>
AuthorDate: Fri Feb 28 13:35:33 2025 +0530
chore: remove need for the intermediate variable in Size function (#2810)
---
src/stats/log_collector.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/stats/log_collector.cc b/src/stats/log_collector.cc
index 842a7e55..ae441549 100644
--- a/src/stats/log_collector.cc
+++ b/src/stats/log_collector.cc
@@ -58,8 +58,7 @@ LogCollector<T>::~LogCollector() {
template <class T>
ssize_t LogCollector<T>::Size() {
std::lock_guard<std::mutex> guard(mu_);
- ssize_t n = entries_.size();
- return n;
+ return static_cast<ssize_t>(entries_.size());
}
template <class T>