commit | d65bb9d0f111718938adc25ba7665f989877145b | [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 | f89692159a5109ff2525827d084aa3c8d2f1154a | |
parent | 765a264a348de8a5fd424c8485387bae1f702852 [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