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

Unified Diff: cc/quads/draw_quad_unittest.cc

Issue 650393002: Modify ALLOW_UNUSED to allow enabling unused local warnings on MSVC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extraneous use Created 6 years, 2 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
Index: cc/quads/draw_quad_unittest.cc
diff --git a/cc/quads/draw_quad_unittest.cc b/cc/quads/draw_quad_unittest.cc
index e3697ec4bf36ae3e3be9d450598a1d6ebf839e06..7b74388063e4614436145da57463835ed68dd3ff 100644
--- a/cc/quads/draw_quad_unittest.cc
+++ b/cc/quads/draw_quad_unittest.cc
@@ -105,14 +105,17 @@ void CompareDrawQuad(DrawQuad* quad,
#define QUAD_DATA \
gfx::Rect quad_rect(30, 40, 50, 60); \
gfx::Rect quad_visible_rect(40, 50, 30, 20); \
- gfx::Rect ALLOW_UNUSED quad_opaque_rect(60, 55, 10, 10); \
- bool ALLOW_UNUSED needs_blending = true;
+ gfx::Rect quad_opaque_rect( 60, 55, 10, 10); \
+ ALLOW_UNUSED_LOCAL(quad_opaque_rect); \
+ bool needs_blending = true; \
+ ALLOW_UNUSED_LOCAL(needs_blending);
#define SETUP_AND_COPY_QUAD_NEW(Type, quad) \
DrawQuad* copy_new = \
render_pass->CopyFromAndAppendDrawQuad(quad_new, copy_shared_state); \
CompareDrawQuad(quad_new, copy_new, copy_shared_state); \
- const Type* ALLOW_UNUSED copy_quad = Type::MaterialCast(copy_new);
+ const Type* copy_quad = Type::MaterialCast(copy_new); \
+ ALLOW_UNUSED_LOCAL(copy_quad);
#define SETUP_AND_COPY_QUAD_ALL(Type, quad) \
DrawQuad* copy_all = \
@@ -124,7 +127,8 @@ void CompareDrawQuad(DrawQuad* quad,
DrawQuad* copy_new = render_pass->CopyFromAndAppendRenderPassDrawQuad( \
quad_new, copy_shared_state, a); \
CompareDrawQuad(quad_new, copy_new, copy_shared_state); \
- const Type* ALLOW_UNUSED copy_quad = Type::MaterialCast(copy_new);
+ const Type* copy_quad = Type::MaterialCast(copy_new); \
+ ALLOW_UNUSED_LOCAL(copy_quad);
#define SETUP_AND_COPY_QUAD_ALL_RP(Type, quad, a) \
DrawQuad* copy_all = render_pass->CopyFromAndAppendRenderPassDrawQuad( \
« base/logging_unittest.cc ('K') | « base/tuple_unittest.cc ('k') | ipc/ipc_message_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698