diff options
author | Juan Gu <juan.gu@mongodb.com> | 2022-08-22 20:59:42 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-22 22:13:50 +0000 |
commit | b5de2a7c8a1af5b74bef1f71743d4bfdf03b5efc (patch) | |
tree | 5010bf10f47b6e9e999f7bcf79baadcb02aea7d0 | |
parent | 9091d46f1b3b42e97b7559c849a585abd5448cd3 (diff) | |
download | mongo-b5de2a7c8a1af5b74bef1f71743d4bfdf03b5efc.tar.gz |
SERVER-68833 did some tidy clang fixes
-rw-r--r-- | .clang-tidy | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/storage_timestamp_test.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/.clang-tidy b/.clang-tidy index 06ba2c49431..586e1742cc0 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,3 +1,3 @@ -Checks: '-*,bugprone-unused-raii,bugprone-use-after-move,readability-const-return-type,readability-avoid-const-params-in-decls,boost-use-to-string' +Checks: '-*,bugprone-unused-raii,bugprone-use-after-move,readability-const-return-type,readability-avoid-const-params-in-decls,boost-use-to-string,bugprone-inaccurate-erase' WarningsAsErrors: '*' HeaderFilterRegex: '(mongo/.*|build/.*)' diff --git a/src/mongo/db/repl/storage_timestamp_test.cpp b/src/mongo/db/repl/storage_timestamp_test.cpp index 3c599fb4a8d..4acd0744457 100644 --- a/src/mongo/db/repl/storage_timestamp_test.cpp +++ b/src/mongo/db/repl/storage_timestamp_test.cpp @@ -2519,7 +2519,8 @@ TEST_F(StorageTimestampTest, TimestampIndexDropsWildcard) { OneOffRead oor(_opCtx, beforeDropTs.addTicks(i + 1).asTimestamp()); auto ident = getDroppedIndexIdent(durableCatalog, origIdents); - indexIdents.erase(std::remove(indexIdents.begin(), indexIdents.end(), ident)); + indexIdents.erase(std::remove(indexIdents.begin(), indexIdents.end(), ident), + indexIdents.end()); origIdents = durableCatalog->getAllIdents(_opCtx); } @@ -2589,7 +2590,8 @@ TEST_F(StorageTimestampTest, TimestampIndexDropsListed) { OneOffRead oor(_opCtx, beforeDropTs.addTicks(i + 1).asTimestamp()); auto ident = getDroppedIndexIdent(durableCatalog, origIdents); - indexIdents.erase(std::remove(indexIdents.begin(), indexIdents.end(), ident)); + indexIdents.erase(std::remove(indexIdents.begin(), indexIdents.end(), ident), + indexIdents.end()); origIdents = durableCatalog->getAllIdents(_opCtx); } |