summaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/gmock-matchers.h
diff options
context:
space:
mode:
authordmauro <dmauro@google.com>2020-10-15 16:38:46 (GMT)
committerDerek Mauro <dmauro@google.com>2020-10-15 17:32:43 (GMT)
commit3c95bf552405fd0cc63cea0ca2f6c4cd89c8d356 (patch)
tree3cd165fd0339cd5c999a3d1cc871c42d9cd7f518 /googlemock/include/gmock/gmock-matchers.h
parentebbeee39f5f97d15799d239344b01b12f3025ba6 (diff)
downloadgoogletest-3c95bf552405fd0cc63cea0ca2f6c4cd89c8d356.zip
googletest-3c95bf552405fd0cc63cea0ca2f6c4cd89c8d356.tar.gz
googletest-3c95bf552405fd0cc63cea0ca2f6c4cd89c8d356.tar.bz2
Googletest export
Fixes build warnings from previous CL Add CMake to internal presubmit to prevent these PiperOrigin-RevId: 337325504
Diffstat (limited to 'googlemock/include/gmock/gmock-matchers.h')
-rw-r--r--googlemock/include/gmock/gmock-matchers.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 696f9e8..13a4671 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -2980,7 +2980,7 @@ auto UnpackStruct(const T& t)
// The array ensures left-to-right order of evaluation.
// Usage: VariadicExpand({expr...});
template <typename T, size_t N>
-void VariadicExpand(const T (&a)[N]) {}
+void VariadicExpand(const T (&)[N]) {}
template <typename Struct, typename StructSize>
class FieldsAreMatcherImpl;
@@ -3029,13 +3029,13 @@ class FieldsAreMatcherImpl<Struct, IndexSequence<I...>>
return good;
}
- int failed_pos = -1;
+ size_t failed_pos = ~size_t{};
std::vector<StringMatchResultListener> inner_listener(sizeof...(I));
VariadicExpand(
- {failed_pos == -1 && !std::get<I>(matchers_).MatchAndExplain(
- std::get<I>(tuple), &inner_listener[I])
+ {failed_pos == ~size_t{} && !std::get<I>(matchers_).MatchAndExplain(
+ std::get<I>(tuple), &inner_listener[I])
? failed_pos = I
: 0 ...});
if (failed_pos != ~size_t{}) {