base: Change DCHECK_IS_ON to a macro DCHECK_IS_ON().
This ensures that if the header is not included, and a DCHECK is guarded
by this check, that the file will fail to compile instead of silently
compiling the DCHECK out.
For example:
#if DCHECK_IS_ON
DCHECK(SomeThing());
#endif
This example would be compiled out if DCHECK_IS_ON was not defined due
to not including the logging.h header.
Instead, this will fail to compile:
#if DCHECK_IS_ON()
DCHECK(SomeThing());
#endif
[email protected]
Review URL: https://codereview.chromium.org/842523002
Cr-Commit-Position: refs/heads/master@{#310626}
diff --git a/ui/gfx/font_list_impl.cc b/ui/gfx/font_list_impl.cc
index 8c00fcc..ec67832 100644
--- a/ui/gfx/font_list_impl.cc
+++ b/ui/gfx/font_list_impl.cc
@@ -104,7 +104,7 @@
DCHECK(!fonts.empty());
font_style_ = fonts[0].GetStyle();
font_size_ = fonts[0].GetFontSize();
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
for (size_t i = 1; i < fonts.size(); ++i) {
DCHECK_EQ(fonts[i].GetStyle(), font_style_);
DCHECK_EQ(fonts[i].GetFontSize(), font_size_);