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

Side by Side Diff: base/scoped_generic.h

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 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
« no previous file with comments | « base/scoped_clear_errno.h ('k') | base/scoped_native_library_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SCOPED_GENERIC_H_ 5 #ifndef BASE_SCOPED_GENERIC_H_
6 #define BASE_SCOPED_GENERIC_H_ 6 #define BASE_SCOPED_GENERIC_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h"
13 #include "base/move.h" 14 #include "base/move.h"
14 15
15 namespace base { 16 namespace base {
16 17
17 // This class acts like ScopedPtr with a custom deleter (although is slightly 18 // This class acts like ScopedPtr with a custom deleter (although is slightly
18 // less fancy in some of the more escoteric respects) except that it keeps a 19 // less fancy in some of the more escoteric respects) except that it keeps a
19 // copy of the object rather than a pointer, and we require that the contained 20 // copy of the object rather than a pointer, and we require that the contained
20 // object has some kind of "invalid" value. 21 // object has some kind of "invalid" value.
21 // 22 //
22 // Defining a scoper based on this class allows you to get a scoper for 23 // Defining a scoper based on this class allows you to get a scoper for
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 174 }
174 175
175 template<class T, class Traits> 176 template<class T, class Traits>
176 bool operator!=(const T& value, const ScopedGeneric<T, Traits>& scoped) { 177 bool operator!=(const T& value, const ScopedGeneric<T, Traits>& scoped) {
177 return value != scoped.get(); 178 return value != scoped.get();
178 } 179 }
179 180
180 } // namespace base 181 } // namespace base
181 182
182 #endif // BASE_SCOPED_GENERIC_H_ 183 #endif // BASE_SCOPED_GENERIC_H_
OLDNEW
« no previous file with comments | « base/scoped_clear_errno.h ('k') | base/scoped_native_library_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698