diff options
-rw-r--r-- | .clang-tidy | 2 | ||||
-rw-r--r-- | src/mongo/db/query/optimizer/algebra/algebra_test.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/.clang-tidy b/.clang-tidy index 5d74af5d5d6..45f37f85dab 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,bugprone-inaccurate-erase,bugprone-integer-division,modernize-make-shared' +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,bugprone-integer-division,modernize-make-shared,bugprone-fold-init-type' WarningsAsErrors: '*' HeaderFilterRegex: '(mongo/.*|build/.*)' diff --git a/src/mongo/db/query/optimizer/algebra/algebra_test.cpp b/src/mongo/db/query/optimizer/algebra/algebra_test.cpp index 013c5a67568..5253947a82a 100644 --- a/src/mongo/db/query/optimizer/algebra/algebra_test.cpp +++ b/src/mongo/db/query/optimizer/algebra/algebra_test.cpp @@ -398,14 +398,14 @@ public: child1; // No need to apply multiplier here, would be applied in the children already. } double transport(NaryNode& node, double multiplier, std::vector<double> children) { - return std::accumulate(children.begin(), children.end(), 0); + return std::accumulate(children.begin(), children.end(), 0.0); } double transport(AtLeastBinaryNode& node, double multiplier, std::vector<double> children, double child0, double child1) { - return child0 + child1 + std::accumulate(children.begin(), children.end(), 0); + return child0 + child1 + std::accumulate(children.begin(), children.end(), 0.0); } }; @@ -502,14 +502,14 @@ public: } double transport(NaryNode& node, std::vector<double> children) { _depthMultiplier /= 10; - return std::accumulate(children.begin(), children.end(), 0); + return std::accumulate(children.begin(), children.end(), 0.0); } double transport(AtLeastBinaryNode& node, std::vector<double> children, double child0, double child1) { _depthMultiplier /= 10; - return child0 + child1 + std::accumulate(children.begin(), children.end(), 0); + return child0 + child1 + std::accumulate(children.begin(), children.end(), 0.0); } }; |