summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorkimvaleen <kim.valen@aalto.fi>2023-07-11 09:05:05 (GMT)
committerkimvaleen <kim.valen@aalto.fi>2023-07-11 09:05:05 (GMT)
commitc88e0b4673f9b08818e0e74c4ed718db5f9b809c (patch)
tree2e2b60bdc0c0ece02664b6fea889e9acbfa8a93d /googletest
parent4a1a299b206ba250a4318f74938ea67c75c3c0c9 (diff)
downloadgoogletest-c88e0b4673f9b08818e0e74c4ed718db5f9b809c.zip
googletest-c88e0b4673f9b08818e0e74c4ed718db5f9b809c.tar.gz
googletest-c88e0b4673f9b08818e0e74c4ed718db5f9b809c.tar.bz2
Fixed variables that could be declared 'const'refs/pull/4313/head
Diffstat (limited to 'googletest')
-rw-r--r--googletest/include/gtest/gtest.h2
-rw-r--r--googletest/include/gtest/internal/gtest-internal.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h
index 86777c8..bee2aca 100644
--- a/googletest/include/gtest/gtest.h
+++ b/googletest/include/gtest/gtest.h
@@ -2102,7 +2102,7 @@ class GTEST_API_ ScopedTrace {
// Therefore, a SCOPED_TRACE() would (correctly) only affect the
// assertions in its own thread.
#define SCOPED_TRACE(message) \
- ::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)( \
+ const ::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)( \
__FILE__, __LINE__, (message))
// Compile-time assertion for type equality.
diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h
index 317894e..a816ec2 100644
--- a/googletest/include/gtest/internal/gtest-internal.h
+++ b/googletest/include/gtest/internal/gtest-internal.h
@@ -1500,7 +1500,7 @@ class NeverThrown {
#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::AlwaysTrue()) { \
- ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
+ const ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \