summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorHossein Ghahramanzadeh <hgsilverman@gmail.com>2021-12-17 01:49:45 (GMT)
committerHossein Ghahramanzadeh <hgsilverman@gmail.com>2022-01-06 14:46:52 (GMT)
commitaea981dd54affc0220c94936084e5c0f1c206dd6 (patch)
treefab724bed6a796173253acfd5980cd3c1688d42f /googletest
parent4adbc9c9b24a9e9a9ac6ad18b3e43b4363b87eb8 (diff)
downloadgoogletest-aea981dd54affc0220c94936084e5c0f1c206dd6.zip
googletest-aea981dd54affc0220c94936084e5c0f1c206dd6.tar.gz
googletest-aea981dd54affc0220c94936084e5c0f1c206dd6.tar.bz2
Improve code readablity.
Diffstat (limited to 'googletest')
-rw-r--r--googletest/src/gtest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 49fa896..959b3bb 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -766,7 +766,7 @@ class PositiveAndNegativeUnitTestFilter {
if (positive_and_negative_filters.size() > 1) {
positive_filter_ = UnitTestFilter{
- positive_filter.size() ? positive_filter : kUniversalFilter};
+ positive_filter.empty() ? kUniversalFilter : positive_filter};
// TODO: Fail on multiple '-' characters
// For the moment to preserve old behavior we concatenate the rest of the
@@ -774,7 +774,7 @@ class PositiveAndNegativeUnitTestFilter {
negative_filter_ = UnitTestFilter{std::accumulate(
positive_and_negative_filters.begin() + 2,
positive_and_negative_filters.end(), positive_and_negative_filters[1],
- [](const auto& lhs, const auto& rhs) { return lhs + '-' + rhs; })};
+ [](const std::string& lhs, const std::string& rhs) { return lhs + '-' + rhs; })};
} else {
// In case we don't have a negative filter and positive filter is ""
// we do not use kUniversalFilter by design as opposed to when we have a