Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(690)

Unified Diff: src/base/logging.cc

Issue 2527883004: Revert of [base] Pass scalar arguments by value in CHECK/DCHECK (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/logging.h ('k') | test/unittests/base/logging-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/logging.cc
diff --git a/src/base/logging.cc b/src/base/logging.cc
index c94fe9d6932c23e78d55de84ded35fa5a4cb6578..cadcb6f1de843eae36600138c201bbf60f8866a3 100644
--- a/src/base/logging.cc
+++ b/src/base/logging.cc
@@ -14,8 +14,9 @@
namespace base {
// Explicit instantiations for commonly used comparisons.
-#define DEFINE_MAKE_CHECK_OP_STRING(type) \
- template std::string* MakeCheckOpString<type, type>(type, type, char const*);
+#define DEFINE_MAKE_CHECK_OP_STRING(type) \
+ template std::string* MakeCheckOpString<type, type>( \
+ type const&, type const&, char const*);
DEFINE_MAKE_CHECK_OP_STRING(int)
DEFINE_MAKE_CHECK_OP_STRING(long) // NOLINT(runtime/int)
DEFINE_MAKE_CHECK_OP_STRING(long long) // NOLINT(runtime/int)
@@ -28,11 +29,11 @@
// Explicit instantiations for floating point checks.
-#define DEFINE_CHECK_OP_IMPL(NAME) \
- template std::string* Check##NAME##Impl<float, float>(float lhs, float rhs, \
- char const* msg); \
- template std::string* Check##NAME##Impl<double, double>( \
- double lhs, double rhs, char const* msg);
+#define DEFINE_CHECK_OP_IMPL(NAME) \
+ template std::string* Check##NAME##Impl<float, float>( \
+ float const& lhs, float const& rhs, char const* msg); \
+ template std::string* Check##NAME##Impl<double, double>( \
+ double const& lhs, double const& rhs, char const* msg);
DEFINE_CHECK_OP_IMPL(EQ)
DEFINE_CHECK_OP_IMPL(NE)
DEFINE_CHECK_OP_IMPL(LE)
« no previous file with comments | « src/base/logging.h ('k') | test/unittests/base/logging-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698