From f2f7292928e48d02c3e46e26ffa9aa8f42a9a53c Mon Sep 17 00:00:00 2001 From: Dan Wang Date: Thu, 28 Nov 2024 15:41:16 +0800 Subject: [PATCH] fix clang-tidy --- src/meta/duplication/duplication_info.cpp | 8 +++----- src/meta/test/duplication_info_test.cpp | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/meta/duplication/duplication_info.cpp b/src/meta/duplication/duplication_info.cpp index f85c6f4f74..377d9326bb 100644 --- a/src/meta/duplication/duplication_info.cpp +++ b/src/meta/duplication/duplication_info.cpp @@ -29,11 +29,10 @@ DSN_DEFINE_uint64(replication, DSN_DEFINE_uint64(replication, dup_progress_min_report_period_ms, - 5 * 60 * 1000, + static_cast(5) * 60 * 1000, "The minimum period in milliseconds that progress of duplication is reported"); -namespace dsn { -namespace replication { +namespace dsn::replication { /*extern*/ void json_encode(dsn::json::JsonWriter &out, const duplication_status::type &s) { @@ -296,5 +295,4 @@ void duplication_info::append_if_valid_for_query( ent.__isset.progress = false; } -} // namespace replication -} // namespace dsn +} // namespace dsn::replication diff --git a/src/meta/test/duplication_info_test.cpp b/src/meta/test/duplication_info_test.cpp index 84e029c368..4e12bcb8c3 100644 --- a/src/meta/test/duplication_info_test.cpp +++ b/src/meta/test/duplication_info_test.cpp @@ -33,8 +33,7 @@ DSN_DECLARE_uint64(dup_progress_min_update_period_ms); -namespace dsn { -namespace replication { +namespace dsn::replication { class duplication_info_test : public testing::Test { @@ -359,5 +358,4 @@ TEST_F(duplication_info_test, is_valid) ASSERT_TRUE(dup.is_invalid_status()); } -} // namespace replication -} // namespace dsn +} // namespace dsn::replication