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

Unified Diff: ppapi/tests/test_graphics_2d.cc

Issue 10942004: Cleanup: avoid foo ? true : false, part 2. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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: ppapi/tests/test_graphics_2d.cc
===================================================================
--- ppapi/tests/test_graphics_2d.cc (revision 157289)
+++ ppapi/tests/test_graphics_2d.cc (working copy)
@@ -307,7 +307,7 @@
std::string TestGraphics2D::TestDescribe() {
const int w = 15, h = 17;
- const bool always_opaque = ::rand() % 2 ? true : false;
+ const bool always_opaque = (::rand() % 2 == 1);
pp::Graphics2D dc(instance_, pp::Size(w, h), always_opaque);
if (dc.is_null())
return "Failure creating a boring device";
@@ -651,8 +651,8 @@
std::string TestGraphics2D::TestDev() {
// Tests GetScale/SetScale via the Graphics2D_Dev C++ wrapper
- const int w=20, h=16;
- const float scale=1.0f/2.0f;
+ const int w = 20, h = 16;
+ const float scale = 1.0f/2.0f;
pp::Graphics2D dc(instance_, pp::Size(w, h), false);
if (dc.is_null())
return "Failure creating a boring device";

Powered by Google App Engine
This is Rietveld 408576698