commit | 7c3b7181adfd2618996ba531bc0a9f54c5382401 | [log] [tgz] |
---|---|---|
author | Yabin Cui <yabinc@google.com> | Mon Mar 21 17:46:21 2016 -0700 |
committer | Yabin Cui <yabinc@google.com> | Mon Mar 21 17:46:21 2016 -0700 |
tree | 697594d823c0c668db81b5624bccc37c722d3423 | |
parent | 7d0fbc353ba24f707b7998fcff0aef04b051218b [diff] |
base: Avoid compilation error when compiled with -Wdangling-else. As logging macros uses `if xxx else yyy` style, it is reported as an error when DCHECK() is compiled with -Wdangling-else option. Because after preprocess, DCHECK(x) becomes: if (EnableDChecks) if (x) ; else LogMessage(FATAL) << yyy; This CL avoids compilation error by replacing `if xxx else yyy` with `xxx && yyy` or `!(xxx) || yyy`. Bug: 26962895 Change-Id: Ib0bf242cc04a238ec31a1ab66b53fc8a5b5ed28f