diff options
author | Juan Gu <juan.gu@mongodb.com> | 2022-08-26 20:50:19 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-26 21:29:45 +0000 |
commit | 79d393bff2838909d85aa7867c710bcf2c34bd9a (patch) | |
tree | a25ae3fadb79c2708bddcce7cae9961df65daa6b /src/mongo | |
parent | b41c85c2e798f11db81b6c0ba3ca400bbf01f063 (diff) | |
download | mongo-79d393bff2838909d85aa7867c710bcf2c34bd9a.tar.gz |
SERVER-69154 fix clang tidy issue static_cast(bug BF-26203 is depend on)
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/base/clonable_ptr_test.cpp | 22 | ||||
-rw-r--r-- | src/mongo/s/chunk_manager_refresh_bm.cpp | 2 |
2 files changed, 9 insertions, 15 deletions
diff --git a/src/mongo/base/clonable_ptr_test.cpp b/src/mongo/base/clonable_ptr_test.cpp index 62dd8c5e9c0..c586a361d5c 100644 --- a/src/mongo/base/clonable_ptr_test.cpp +++ b/src/mongo/base/clonable_ptr_test.cpp @@ -286,13 +286,12 @@ void construction() { } // Test non-conversion pointer construction - { static_assert(!std::is_convertible<Clonable*, mongo::clonable_ptr<Clonable>>::value, ""); } + { static_assert(!std::is_convertible<Clonable*, mongo::clonable_ptr<Clonable>>::value); } // Test conversion unique pointer construction { static_assert( - std::is_convertible<std::unique_ptr<Clonable>, mongo::clonable_ptr<Clonable>>::value, - ""); + std::is_convertible<std::unique_ptr<Clonable>, mongo::clonable_ptr<Clonable>>::value); } } @@ -302,7 +301,7 @@ void augmentedConstruction() { // Test default construction { static_assert( - !std::is_default_constructible<mongo::clonable_ptr<Clonable, CloneFactory>>::value, ""); + !std::is_default_constructible<mongo::clonable_ptr<Clonable, CloneFactory>>::value); } // Test Clone Factory construction @@ -313,8 +312,7 @@ void augmentedConstruction() { // Test non-construction from a nullptr { static_assert(!std::is_constructible<mongo::clonable_ptr<Clonable, CloneFactory>, - std::nullptr_t>::value, - ""); + std::nullptr_t>::value); } #endif @@ -326,8 +324,7 @@ void augmentedConstruction() { // Test construction from a raw Clonable pointer. { static_assert( - !std::is_constructible<mongo::clonable_ptr<Clonable, CloneFactory>, Clonable*>::value, - ""); + !std::is_constructible<mongo::clonable_ptr<Clonable, CloneFactory>, Clonable*>::value); } #endif @@ -386,22 +383,19 @@ void augmentedConstruction() { // Test non-conversion pointer construction { static_assert( - !std::is_convertible<mongo::clonable_ptr<Clonable, CloneFactory>, Clonable*>::value, - ""); + !std::is_convertible<mongo::clonable_ptr<Clonable, CloneFactory>, Clonable*>::value); } // Test non-conversion from factory { static_assert( - !std::is_convertible<mongo::clonable_ptr<Clonable, CloneFactory>, CloneFactory>::value, - ""); + !std::is_convertible<mongo::clonable_ptr<Clonable, CloneFactory>, CloneFactory>::value); } // Test conversion unique pointer construction { static_assert(!std::is_convertible<std::unique_ptr<Clonable>, - mongo::clonable_ptr<Clonable, CloneFactory>>::value, - ""); + mongo::clonable_ptr<Clonable, CloneFactory>>::value); } } diff --git a/src/mongo/s/chunk_manager_refresh_bm.cpp b/src/mongo/s/chunk_manager_refresh_bm.cpp index 12253be4ab2..8e18a5e3e51 100644 --- a/src/mongo/s/chunk_manager_refresh_bm.cpp +++ b/src/mongo/s/chunk_manager_refresh_bm.cpp @@ -195,7 +195,7 @@ auto BM_FullBuildOfChunkManager(benchmark::State& state, ShardSelectorFn selectS std::vector<BSONObj> makeKeys(int nChunks) { constexpr int nFinds = 200000; - static_assert(nFinds % 2 == 0, ""); + static_assert(nFinds % 2 == 0); PseudoRandom rand(12345); std::vector<BSONObj> keys; |