| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 #endif // !ENABLE_DEBUG | 172 #endif // !ENABLE_DEBUG |
| 173 | 173 |
| 174 #define COMPILE_TIME_ASSERT(expr) char CTA_UNIQUE_NAME[expr] | 174 #define COMPILE_TIME_ASSERT(expr) char CTA_UNIQUE_NAME[expr] |
| 175 #define CTA_UNIQUE_NAME CTA_MAKE_NAME(__LINE__) | 175 #define CTA_UNIQUE_NAME CTA_MAKE_NAME(__LINE__) |
| 176 #define CTA_MAKE_NAME(line) CTA_MAKE_NAME2(line) | 176 #define CTA_MAKE_NAME(line) CTA_MAKE_NAME2(line) |
| 177 #define CTA_MAKE_NAME2(line) constraint_ ## line | 177 #define CTA_MAKE_NAME2(line) constraint_ ## line |
| 178 | 178 |
| 179 // Forces compiler to inline, even against its better judgement. Use wisely. | 179 // Forces compiler to inline, even against its better judgement. Use wisely. |
| 180 #if defined(__GNUC__) | 180 #if defined(__GNUC__) |
| 181 #define FORCE_INLINE __attribute__((always_inline)) | 181 #define FORCE_INLINE __attribute__ ((__always_inline__)) |
| 182 #elif defined(WEBRTC_WIN) | 182 #elif defined(WEBRTC_WIN) |
| 183 #define FORCE_INLINE __forceinline | 183 #define FORCE_INLINE __forceinline |
| 184 #else | 184 #else |
| 185 #define FORCE_INLINE | 185 #define FORCE_INLINE |
| 186 #endif | 186 #endif |
| 187 | 187 |
| 188 // Annotate a function indicating the caller must examine the return value. | 188 // Annotate a function indicating the caller must examine the return value. |
| 189 // Use like: | 189 // Use like: |
| 190 // int foo() WARN_UNUSED_RESULT; | 190 // int foo() WARN_UNUSED_RESULT; |
| 191 // To explicitly ignore a result, see |ignore_result()| in <base/basictypes.h>. | 191 // To explicitly ignore a result, see |ignore_result()| in <base/basictypes.h>. |
| 192 // TODO(ajm): Hack to avoid multiple definitions until the base/ of webrtc and | 192 // TODO(ajm): Hack to avoid multiple definitions until the base/ of webrtc and |
| 193 // libjingle are merged. | 193 // libjingle are merged. |
| 194 #if !defined(WARN_UNUSED_RESULT) | 194 #if !defined(WARN_UNUSED_RESULT) |
| 195 #if defined(__GNUC__) || defined(__clang__) | 195 #if defined(__GNUC__) || defined(__clang__) |
| 196 #define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) | 196 #define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) |
| 197 #else | 197 #else |
| 198 #define WARN_UNUSED_RESULT | 198 #define WARN_UNUSED_RESULT |
| 199 #endif | 199 #endif |
| 200 #endif // WARN_UNUSED_RESULT | 200 #endif // WARN_UNUSED_RESULT |
| 201 | 201 |
| 202 #endif // WEBRTC_BASE_COMMON_H_ // NOLINT | 202 #endif // WEBRTC_BASE_COMMON_H_ // NOLINT |
| OLD | NEW |