| OLD | NEW |
| 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 // Define a set of C++ specific macros. | 5 // Define a set of C++ specific macros. |
| 6 // Mojo C++ API users can assume that mojo/public/cpp/system/macros.h | 6 // Mojo C++ API users can assume that mojo/public/cpp/system/macros.h |
| 7 // includes mojo/public/c/system/macros.h. | 7 // includes mojo/public/c/system/macros.h. |
| 8 | 8 |
| 9 #ifndef MOJO_PUBLIC_CPP_SYSTEM_MACROS_H_ | 9 #ifndef MOJO_PUBLIC_CPP_SYSTEM_MACROS_H_ |
| 10 #define MOJO_PUBLIC_CPP_SYSTEM_MACROS_H_ | 10 #define MOJO_PUBLIC_CPP_SYSTEM_MACROS_H_ |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // In the .cc file: | 62 // In the .cc file: |
| 63 // MOJO_STATIC_CONST_MEMBER_DEFINITION const int Foo::kBar; | 63 // MOJO_STATIC_CONST_MEMBER_DEFINITION const int Foo::kBar; |
| 64 #if defined(_MSC_VER) && _MSC_VER < 1900 | 64 #if defined(_MSC_VER) && _MSC_VER < 1900 |
| 65 #define MOJO_STATIC_CONST_MEMBER_DEFINITION __declspec(selectany) | 65 #define MOJO_STATIC_CONST_MEMBER_DEFINITION __declspec(selectany) |
| 66 #else | 66 #else |
| 67 #define MOJO_STATIC_CONST_MEMBER_DEFINITION | 67 #define MOJO_STATIC_CONST_MEMBER_DEFINITION |
| 68 #endif | 68 #endif |
| 69 | 69 |
| 70 namespace mojo { | 70 namespace mojo { |
| 71 | 71 |
| 72 // Used to explicitly mark the return value of a function as unused. (You this | 72 // Used to explicitly mark the return value of a function as unused. (Use this |
| 73 // if you are really sure you don't want to do anything with the return value of | 73 // if you are really sure you don't want to do anything with the return value of |
| 74 // a function marked with |MOJO_WARN_UNUSED_RESULT|. | 74 // a function marked with |MOJO_WARN_UNUSED_RESULT|. |
| 75 template <typename T> | 75 template <typename T> |
| 76 inline void ignore_result(const T&) { | 76 inline void ignore_result(const T&) { |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace mojo | 79 } // namespace mojo |
| 80 | 80 |
| 81 #endif // MOJO_PUBLIC_CPP_SYSTEM_MACROS_H_ | 81 #endif // MOJO_PUBLIC_CPP_SYSTEM_MACROS_H_ |
| OLD | NEW |