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

Side by Side Diff: base/mac/scoped_ioobject.h

Issue 9845017: Fix a few warnings that -Wnull-conversion of a future clang will complain about. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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
« no previous file with comments | « no previous file | base/process_util_mac.mm » ('j') | chrome/browser/mac/install_from_dmg.mm » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef BASE_MAC_SCOPED_IOOBJECT_H_ 5 #ifndef BASE_MAC_SCOPED_IOOBJECT_H_
6 #define BASE_MAC_SCOPED_IOOBJECT_H_ 6 #define BASE_MAC_SCOPED_IOOBJECT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <IOKit/IOKitLib.h> 9 #include <IOKit/IOKitLib.h>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 void swap(ScopedIOObject& that) { 54 void swap(ScopedIOObject& that) {
55 IOT temp = that.object_; 55 IOT temp = that.object_;
56 that.object_ = object_; 56 that.object_ = object_;
57 object_ = temp; 57 object_ = temp;
58 } 58 }
59 59
60 IOT release() WARN_UNUSED_RESULT { 60 IOT release() WARN_UNUSED_RESULT {
61 IOT temp = object_; 61 IOT temp = object_;
62 object_ = NULL; 62 object_ = 0;
Mark Mentovai 2012/03/27 21:09:59 It would be proper to use IO_OBJECT_NULL here.
63 return temp; 63 return temp;
64 } 64 }
65 65
66 private: 66 private:
67 IOT object_; 67 IOT object_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(ScopedIOObject); 69 DISALLOW_COPY_AND_ASSIGN(ScopedIOObject);
70 }; 70 };
71 71
72 } // namespace mac 72 } // namespace mac
73 } // namespace base 73 } // namespace base
74 74
75 #endif // BASE_MAC_SCOPED_IOOBJECT_H_ 75 #endif // BASE_MAC_SCOPED_IOOBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | base/process_util_mac.mm » ('j') | chrome/browser/mac/install_from_dmg.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698