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

Unified Diff: ppapi/shared_impl/flash_clipboard_format_registry.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/shared_impl/array_writer.h ('k') | ppapi/tests/test_file_io.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/flash_clipboard_format_registry.cc
diff --git a/ppapi/shared_impl/flash_clipboard_format_registry.cc b/ppapi/shared_impl/flash_clipboard_format_registry.cc
index 89a051e2d3d9c5d5c6f833b38c9efedec531d569..fa43478a33954364579ce75d626768ef25c1aae1 100644
--- a/ppapi/shared_impl/flash_clipboard_format_registry.cc
+++ b/ppapi/shared_impl/flash_clipboard_format_registry.cc
@@ -6,6 +6,8 @@
#include <cctype>
+#include "base/numerics/safe_conversions.h"
+
namespace ppapi {
namespace {
@@ -43,7 +45,8 @@ uint32_t FlashClipboardFormatRegistry::RegisterFormat(
custom_formats_.size() > kMaxNumFormats) {
return PP_FLASH_CLIPBOARD_FORMAT_INVALID;
}
- uint32_t key = kFirstCustomFormat + custom_formats_.size();
+ uint32_t key = kFirstCustomFormat +
+ base::checked_cast<uint32_t>(custom_formats_.size());
custom_formats_[key] = format_name;
return key;
}
« no previous file with comments | « ppapi/shared_impl/array_writer.h ('k') | ppapi/tests/test_file_io.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698