Commit 6a592ee0 authored by Wez's avatar Wez Committed by Commit Bot

Remove redundant DCHECK_IS_ON() condition in DCHECK_OP() implementation.

The implementation was wrapped with a DCHECK_IS_ON() condition by
https://codereview.chromium.org/2653073002/ but the DCHECK_IS_ON() check
inside the implementation was not removed. Remove it to make the macro
a little easier to read.

Bug: 684105
Change-Id: Ia0e923f89432b31fc2ec32b7438e5e6c416433bf
Reviewed-on: https://chromium-review.googlesource.com/1072455
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561995}
parent 4c1309c0
...@@ -903,9 +903,8 @@ const LogSeverity LOG_DCHECK = LOG_FATAL; ...@@ -903,9 +903,8 @@ const LogSeverity LOG_DCHECK = LOG_FATAL;
#define DCHECK_OP(name, op, val1, val2) \ #define DCHECK_OP(name, op, val1, val2) \
switch (0) case 0: default: \ switch (0) case 0: default: \
if (::logging::CheckOpResult true_if_passed = \ if (::logging::CheckOpResult true_if_passed = \
DCHECK_IS_ON() ? \
::logging::Check##name##Impl((val1), (val2), \ ::logging::Check##name##Impl((val1), (val2), \
#val1 " " #op " " #val2) : nullptr) \ #val1 " " #op " " #val2)) \
; \ ; \
else \ else \
::logging::LogMessage(__FILE__, __LINE__, ::logging::LOG_DCHECK, \ ::logging::LogMessage(__FILE__, __LINE__, ::logging::LOG_DCHECK, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment