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

Side by Side Diff: base/containers/stack_container.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/containers/small_map.h ('k') | base/containers/stack_container_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CONTAINERS_STACK_CONTAINER_H_ 5 #ifndef BASE_CONTAINERS_STACK_CONTAINER_H_
6 #define BASE_CONTAINERS_STACK_CONTAINER_H_ 6 #define BASE_CONTAINERS_STACK_CONTAINER_H_
7 7
8 #include <stddef.h>
9
8 #include <string> 10 #include <string>
9 #include <vector> 11 #include <vector>
10 12
11 #include "base/basictypes.h" 13 #include "base/macros.h"
12 #include "base/memory/aligned_memory.h" 14 #include "base/memory/aligned_memory.h"
13 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
14 #include "build/build_config.h" 16 #include "build/build_config.h"
15 17
16 namespace base { 18 namespace base {
17 19
18 // This allocator can be used with STL containers to provide a stack buffer 20 // This allocator can be used with STL containers to provide a stack buffer
19 // from which to allocate memory and overflows onto the heap. This stack buffer 21 // from which to allocate memory and overflows onto the heap. This stack buffer
20 // would be allocated on the stack and allows us to avoid heap operations in 22 // would be allocated on the stack and allows us to avoid heap operations in
21 // some situations. 23 // some situations.
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // operator-> (using "->at()" does exception stuff we don't want). 259 // operator-> (using "->at()" does exception stuff we don't want).
258 T& operator[](size_t i) { return this->container().operator[](i); } 260 T& operator[](size_t i) { return this->container().operator[](i); }
259 const T& operator[](size_t i) const { 261 const T& operator[](size_t i) const {
260 return this->container().operator[](i); 262 return this->container().operator[](i);
261 } 263 }
262 }; 264 };
263 265
264 } // namespace base 266 } // namespace base
265 267
266 #endif // BASE_CONTAINERS_STACK_CONTAINER_H_ 268 #endif // BASE_CONTAINERS_STACK_CONTAINER_H_
OLDNEW
« no previous file with comments | « base/containers/small_map.h ('k') | base/containers/stack_container_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698