Skip to content

Commit 5bd0f08

Browse files
Merge pull request #4374 from masbug:main
PiperOrigin-RevId: 568317621 Change-Id: Icf7fb519f96f5e88eb0df491eed143134c8ac6eb
2 parents e40661d + e27b194 commit 5bd0f08

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

googlemock/include/gmock/gmock-function-mocker.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_FUNCTION_MOCKER_H_
3838
#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_FUNCTION_MOCKER_H_
3939

40+
#include <cstddef>
4041
#include <type_traits> // IWYU pragma: keep
4142
#include <utility> // IWYU pragma: keep
4243

@@ -69,22 +70,22 @@ constexpr bool PrefixOf(const char* a, const char* b) {
6970
return *a == 0 || (*a == *b && internal::PrefixOf(a + 1, b + 1));
7071
}
7172

72-
template <int N, int M>
73+
template <size_t N, size_t M>
7374
constexpr bool StartsWith(const char (&prefix)[N], const char (&str)[M]) {
7475
return N <= M && internal::PrefixOf(prefix, str);
7576
}
7677

77-
template <int N, int M>
78+
template <size_t N, size_t M>
7879
constexpr bool EndsWith(const char (&suffix)[N], const char (&str)[M]) {
7980
return N <= M && internal::PrefixOf(suffix, str + M - N);
8081
}
8182

82-
template <int N, int M>
83+
template <size_t N, size_t M>
8384
constexpr bool Equals(const char (&a)[N], const char (&b)[M]) {
8485
return N == M && internal::PrefixOf(a, b);
8586
}
8687

87-
template <int N>
88+
template <size_t N>
8889
constexpr bool ValidateSpec(const char (&spec)[N]) {
8990
return internal::Equals("const", spec) ||
9091
internal::Equals("override", spec) ||

0 commit comments

Comments
 (0)