OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _FX_SYSTEM_H_ | 7 #ifndef _FX_SYSTEM_H_ |
8 #define _FX_SYSTEM_H_ | 8 #define _FX_SYSTEM_H_ |
9 #define _FX_WIN32_DESKTOP_ 1 | 9 #define _FX_WIN32_DESKTOP_ 1 |
10 #define _FX_LINUX_DESKTOP_ 4 | 10 #define _FX_LINUX_DESKTOP_ 4 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 #define FXSYS_Div(a, b) ((a) / (b)) | 273 #define FXSYS_Div(a, b) ((a) / (b)) |
274 #define FXSYS_MulDiv(a, b, c) ((a) * (b) / (c)) | 274 #define FXSYS_MulDiv(a, b, c) ((a) * (b) / (c)) |
275 #define FXSYS_sqrt2(a, b) (FX_FLOAT)FXSYS_sqrt((a)*(a) + (b)*(b)) | 275 #define FXSYS_sqrt2(a, b) (FX_FLOAT)FXSYS_sqrt((a)*(a) + (b)*(b)) |
276 #ifdef __cplusplus | 276 #ifdef __cplusplus |
277 }; | 277 }; |
278 | 278 |
279 #include "../../../third_party/numerics/safe_math.h" | 279 #include "../../../third_party/numerics/safe_math.h" |
280 typedef base::CheckedNumeric<FX_DWORD> FX_SAFE_DWORD; | 280 typedef base::CheckedNumeric<FX_DWORD> FX_SAFE_DWORD; |
281 typedef base::CheckedNumeric<FX_INT32> FX_SAFE_INT32; | 281 typedef base::CheckedNumeric<FX_INT32> FX_SAFE_INT32; |
282 typedef base::CheckedNumeric<size_t> FX_SAFE_SIZE_T; | 282 typedef base::CheckedNumeric<size_t> FX_SAFE_SIZE_T; |
| 283 |
283 #if defined(__clang__) || _MSC_VER >= 1700 | 284 #if defined(__clang__) || _MSC_VER >= 1700 |
284 #define FX_FINAL final | 285 #define FX_FINAL final |
| 286 #define FX_OVERRIDE override |
285 #elif defined(__GNUC__) && __cplusplus >= 201103 && \ | 287 #elif defined(__GNUC__) && __cplusplus >= 201103 && \ |
286 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700 | 288 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700 |
287 #define FX_FINAL final | 289 #define FX_FINAL final |
| 290 #define FX_OVERRIDE override |
288 #else | 291 #else |
289 #define FX_FINAL | 292 #define FX_FINAL |
| 293 #define FX_OVERRIDE |
290 #endif | 294 #endif |
291 #endif | 295 #endif |
292 #endif | 296 #endif |
OLD | NEW |