diff options
author | Benety Goh <benety@mongodb.com> | 2020-10-03 19:29:23 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-10-04 00:14:28 +0000 |
commit | 9ba166c429b07ef3cfb4d8553d39564150844196 (patch) | |
tree | 02e68a41fbc25d181b3f9ffb76f9de17ec820298 /src/mongo/unittest/unittest.cpp | |
parent | f18b0b611b398fefc2345775b8015dbdaac6819f (diff) | |
download | mongo-9ba166c429b07ef3cfb4d8553d39564150844196.tar.gz |
SERVER-51240 fix readability-avoid-const-params-in-decls in tests
Diffstat (limited to 'src/mongo/unittest/unittest.cpp')
-rw-r--r-- | src/mongo/unittest/unittest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/unittest/unittest.cpp b/src/mongo/unittest/unittest.cpp index 0d28c50999e..b2daed62d82 100644 --- a/src/mongo/unittest/unittest.cpp +++ b/src/mongo/unittest/unittest.cpp @@ -196,7 +196,7 @@ public: const std::vector<std::string>& getCapturedTextFormatLogMessages() const; std::vector<BSONObj> getCapturedBSONFormatLogMessages() const; int64_t countTextFormatLogLinesContaining(const std::string& needle); - int64_t countBSONFormatLogLinesIsSubset(const BSONObj needle); + int64_t countBSONFormatLogLinesIsSubset(const BSONObj& needle); void printCapturedTextFormatLogLines() const; private: @@ -346,7 +346,7 @@ bool isSubset(BSONObj haystack, BSONObj needle) { return true; } -int64_t CaptureLogs::countBSONFormatLogLinesIsSubset(const BSONObj needle) { +int64_t CaptureLogs::countBSONFormatLogLinesIsSubset(const BSONObj& needle) { const auto& msgs = getCapturedBSONFormatLogMessages(); return std::count_if( msgs.begin(), msgs.end(), [&](const BSONObj s) { return isSubset(s, needle); }); @@ -369,7 +369,7 @@ std::vector<BSONObj> Test::getCapturedBSONFormatLogMessages() const { int64_t Test::countTextFormatLogLinesContaining(const std::string& needle) { return getCaptureLogs()->countTextFormatLogLinesContaining(needle); } -int64_t Test::countBSONFormatLogLinesIsSubset(const BSONObj needle) { +int64_t Test::countBSONFormatLogLinesIsSubset(const BSONObj& needle) { return getCaptureLogs()->countBSONFormatLogLinesIsSubset(needle); } void Test::printCapturedTextFormatLogLines() const { |