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

Unified Diff: ppapi/examples/gamepad/gamepad.cc

Issue 915403003: Enable size_t to int truncation warnings in PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ppapi_unittests win x64 Created 5 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 | « ppapi/cpp/private/flash_clipboard.cc ('k') | ppapi/examples/ime/ime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/gamepad/gamepad.cc
diff --git a/ppapi/examples/gamepad/gamepad.cc b/ppapi/examples/gamepad/gamepad.cc
index a94ccd43c1bb92151a99f80afc645f8139bc16bd..d7f0053559c8f1214363321bad115632d3de394d 100644
--- a/ppapi/examples/gamepad/gamepad.cc
+++ b/ppapi/examples/gamepad/gamepad.cc
@@ -108,7 +108,7 @@ class MyInstance : public pp::Instance {
for (size_t i = 0; i < gamepad_data.items[0].buttons_length; ++i) {
float button_val = gamepad_data.items[0].buttons[i];
uint32_t colour = static_cast<uint32_t>((button_val * 192) + 63) << 24;
- int x = i * 8 + 10;
+ int x = static_cast<int>(i) * 8 + 10;
int y = 10;
FillRect(&image, x - 3, y - 3, 7, 7, colour);
}
« no previous file with comments | « ppapi/cpp/private/flash_clipboard.cc ('k') | ppapi/examples/ime/ime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698