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

Unified Diff: ppapi/cpp/dev/buffer_dev.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 | « no previous file | ppapi/cpp/image_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/buffer_dev.cc
diff --git a/ppapi/cpp/dev/buffer_dev.cc b/ppapi/cpp/dev/buffer_dev.cc
index aca7b1b795fbe3b13d5049092be2eddee858ead0..5435afdceceb3cfbaa53b3cf25abd5eb30565052 100644
--- a/ppapi/cpp/dev/buffer_dev.cc
+++ b/ppapi/cpp/dev/buffer_dev.cc
@@ -59,11 +59,13 @@ Buffer_Dev& Buffer_Dev::operator=(const Buffer_Dev& rhs) {
}
void Buffer_Dev::Init() {
- if (!get_interface<PPB_Buffer_Dev>()->Describe(pp_resource(), &size_) ||
- !(data_ = get_interface<PPB_Buffer_Dev>()->Map(pp_resource()))) {
- data_ = NULL;
- size_ = 0;
+ if (get_interface<PPB_Buffer_Dev>()->Describe(pp_resource(), &size_)) {
+ data_ = get_interface<PPB_Buffer_Dev>()->Map(pp_resource());
+ if (data_)
+ return;
}
+ data_ = NULL;
+ size_ = 0;
}
} // namespace pp
« no previous file with comments | « no previous file | ppapi/cpp/image_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698