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

Unified Diff: components/printing/renderer/print_web_view_helper.cc

Issue 1676703002: Stop using macros to paste together names for static_asserts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: static-asserts-enums: a,b,#a Created 4 years, 10 months 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 | « no previous file | content/browser/web_contents/web_contents_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/printing/renderer/print_web_view_helper.cc
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
index 6a8f1c3211884a9adea20b57ce6497c5bf8c4968..991105448bb6ac3bea46a6f7a63c1dbbd3bd738a 100644
--- a/components/printing/renderer/print_web_view_helper.cc
+++ b/components/printing/renderer/print_web_view_helper.cc
@@ -58,16 +58,15 @@ namespace printing {
namespace {
-#define STATIC_ASSERT_PP_MATCHING_ENUM(a, b) \
- static_assert(static_cast<int>(a) == static_cast<int>(b), \
- "mismatching enums: " #a)
-
-// Check blink::WebDuplexMode and printing::DuplexMode are kept in sync.
-STATIC_ASSERT_PP_MATCHING_ENUM(blink::WebUnknownDuplexMode,
- UNKNOWN_DUPLEX_MODE);
-STATIC_ASSERT_PP_MATCHING_ENUM(blink::WebSimplex, SIMPLEX);
-STATIC_ASSERT_PP_MATCHING_ENUM(blink::WebLongEdge, LONG_EDGE);
-STATIC_ASSERT_PP_MATCHING_ENUM(blink::WebShortEdge, SHORT_EDGE);
+#define STATIC_ASSERT_ENUM(a, b) \
+ static_assert(static_cast<int>(a) == static_cast<int>(b), \
+ "mismatching enums: " #a)
+
+// Check blink and printing enums are kept in sync.
+STATIC_ASSERT_ENUM(blink::WebUnknownDuplexMode, UNKNOWN_DUPLEX_MODE);
+STATIC_ASSERT_ENUM(blink::WebSimplex, SIMPLEX);
+STATIC_ASSERT_ENUM(blink::WebLongEdge, LONG_EDGE);
+STATIC_ASSERT_ENUM(blink::WebShortEdge, SHORT_EDGE);
enum PrintPreviewHelperEvents {
PREVIEW_EVENT_REQUESTED,
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698