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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/cpp/dev/buffer_dev.h" 5 #include "ppapi/cpp/dev/buffer_dev.h"
6 6
7 #include "ppapi/c/dev/ppb_buffer_dev.h" 7 #include "ppapi/c/dev/ppb_buffer_dev.h"
8 #include "ppapi/cpp/instance_handle.h" 8 #include "ppapi/cpp/instance_handle.h"
9 #include "ppapi/cpp/module.h" 9 #include "ppapi/cpp/module.h"
10 #include "ppapi/cpp/module_impl.h" 10 #include "ppapi/cpp/module_impl.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 get_interface<PPB_Buffer_Dev>()->Unmap(pp_resource()); 52 get_interface<PPB_Buffer_Dev>()->Unmap(pp_resource());
53 } 53 }
54 54
55 Buffer_Dev& Buffer_Dev::operator=(const Buffer_Dev& rhs) { 55 Buffer_Dev& Buffer_Dev::operator=(const Buffer_Dev& rhs) {
56 Resource::operator=(rhs); 56 Resource::operator=(rhs);
57 Init(); 57 Init();
58 return *this; 58 return *this;
59 } 59 }
60 60
61 void Buffer_Dev::Init() { 61 void Buffer_Dev::Init() {
62 if (!get_interface<PPB_Buffer_Dev>()->Describe(pp_resource(), &size_) || 62 if (get_interface<PPB_Buffer_Dev>()->Describe(pp_resource(), &size_)) {
63 !(data_ = get_interface<PPB_Buffer_Dev>()->Map(pp_resource()))) { 63 data_ = get_interface<PPB_Buffer_Dev>()->Map(pp_resource());
64 data_ = NULL; 64 if (data_)
65 size_ = 0; 65 return;
66 } 66 }
67 data_ = NULL;
68 size_ = 0;
67 } 69 }
68 70
69 } // namespace pp 71 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698