| OLD | NEW |
| 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_BASICTYPES_H_ | 5 #ifndef BASE_BASICTYPES_H_ |
| 6 #define BASE_BASICTYPES_H_ | 6 #define BASE_BASICTYPES_H_ |
| 7 #pragma once | |
| 8 | 7 |
| 9 #include <limits.h> // So we can set the bounds of our types | 8 #include <limits.h> // So we can set the bounds of our types |
| 10 #include <stddef.h> // For size_t | 9 #include <stddef.h> // For size_t |
| 11 #include <string.h> // for memcpy | 10 #include <string.h> // for memcpy |
| 12 | 11 |
| 13 #include "base/port.h" // Types that only need exist on certain systems | 12 #include "base/port.h" // Types that only need exist on certain systems |
| 14 | 13 |
| 15 #ifndef COMPILER_MSVC | 14 #ifndef COMPILER_MSVC |
| 16 // stdint.h is part of C99 but MSVC doesn't have it. | 15 // stdint.h is part of C99 but MSVC doesn't have it. |
| 17 #include <stdint.h> // For intptr_t. | 16 #include <stdint.h> // For intptr_t. |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 352 |
| 354 // Use these to declare and define a static local variable (static T;) so that | 353 // Use these to declare and define a static local variable (static T;) so that |
| 355 // it is leaked so that its destructors are not called at exit. If you need | 354 // it is leaked so that its destructors are not called at exit. If you need |
| 356 // thread-safe initialization, use base/lazy_instance.h instead. | 355 // thread-safe initialization, use base/lazy_instance.h instead. |
| 357 #define CR_DEFINE_STATIC_LOCAL(type, name, arguments) \ | 356 #define CR_DEFINE_STATIC_LOCAL(type, name, arguments) \ |
| 358 static type& name = *new type arguments | 357 static type& name = *new type arguments |
| 359 | 358 |
| 360 } // base | 359 } // base |
| 361 | 360 |
| 362 #endif // BASE_BASICTYPES_H_ | 361 #endif // BASE_BASICTYPES_H_ |
| OLD | NEW |