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

Unified Diff: ppapi/cpp/image_data.cc

Issue 375133003: Fixes for re-enabling more MSVC level 4 warnings: ppapi/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt build fix Created 6 years, 5 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/dev/buffer_dev.cc ('k') | ppapi/examples/gles2/gles2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/image_data.cc
diff --git a/ppapi/cpp/image_data.cc b/ppapi/cpp/image_data.cc
index a0c3aeff7969caee0e60e24615dd758f714c804c..d9738964795eb698d8d612a1b2964f1164594415 100644
--- a/ppapi/cpp/image_data.cc
+++ b/ppapi/cpp/image_data.cc
@@ -92,9 +92,12 @@ PP_ImageDataFormat ImageData::GetNativeImageDataFormat() {
void ImageData::InitData() {
if (!has_interface<PPB_ImageData_1_0>())
return;
- if (!get_interface<PPB_ImageData_1_0>()->Describe(pp_resource(), &desc_) ||
- !(data_ = get_interface<PPB_ImageData_1_0>()->Map(pp_resource())))
- *this = ImageData();
+ if (get_interface<PPB_ImageData_1_0>()->Describe(pp_resource(), &desc_)) {
+ data_ = get_interface<PPB_ImageData_1_0>()->Map(pp_resource());
+ if (data_)
+ return;
+ }
+ *this = ImageData();
}
} // namespace pp
« no previous file with comments | « ppapi/cpp/dev/buffer_dev.cc ('k') | ppapi/examples/gles2/gles2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698