Skip to content

Commit c88e0b4

Browse files
committed
Fixed variables that could be declared 'const'
1 parent 4a1a299 commit c88e0b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

googletest/include/gtest/gtest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,7 @@ class GTEST_API_ ScopedTrace {
21022102
// Therefore, a SCOPED_TRACE() would (correctly) only affect the
21032103
// assertions in its own thread.
21042104
#define SCOPED_TRACE(message) \
2105-
::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)( \
2105+
const ::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)( \
21062106
__FILE__, __LINE__, (message))
21072107

21082108
// Compile-time assertion for type equality.

googletest/include/gtest/internal/gtest-internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ class NeverThrown {
15001500
#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
15011501
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
15021502
if (::testing::internal::AlwaysTrue()) { \
1503-
::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
1503+
const ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
15041504
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
15051505
if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
15061506
goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \

0 commit comments

Comments
 (0)