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

Side by Side Diff: base/stack_container.h

Issue 10735044: Remove #pragma once. Just from base/ for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « base/single_thread_task_runner.h ('k') | base/stl_util.h » ('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_STACK_CONTAINER_H_ 5 #ifndef BASE_STACK_CONTAINER_H_
6 #define BASE_STACK_CONTAINER_H_ 6 #define BASE_STACK_CONTAINER_H_
7 #pragma once
8 7
9 #include <string> 8 #include <string>
10 #include <vector> 9 #include <vector>
11 10
12 #include "base/basictypes.h" 11 #include "base/basictypes.h"
13 #include "build/build_config.h" 12 #include "build/build_config.h"
14 #include "base/memory/aligned_memory.h" 13 #include "base/memory/aligned_memory.h"
15 14
16 // This allocator can be used with STL containers to provide a stack buffer 15 // This allocator can be used with STL containers to provide a stack buffer
17 // from which to allocate memory and overflows onto the heap. This stack buffer 16 // from which to allocate memory and overflows onto the heap. This stack buffer
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 242
244 // Vectors are commonly indexed, which isn't very convenient even with 243 // Vectors are commonly indexed, which isn't very convenient even with
245 // operator-> (using "->at()" does exception stuff we don't want). 244 // operator-> (using "->at()" does exception stuff we don't want).
246 T& operator[](size_t i) { return this->container().operator[](i); } 245 T& operator[](size_t i) { return this->container().operator[](i); }
247 const T& operator[](size_t i) const { 246 const T& operator[](size_t i) const {
248 return this->container().operator[](i); 247 return this->container().operator[](i);
249 } 248 }
250 }; 249 };
251 250
252 #endif // BASE_STACK_CONTAINER_H_ 251 #endif // BASE_STACK_CONTAINER_H_
OLDNEW
« no previous file with comments | « base/single_thread_task_runner.h ('k') | base/stl_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698