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

Side by Side Diff: core/include/fxcrt/fx_system.h

Issue 1577503002: Merge to XFA: Switch most min/max macros to std::min/max. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 4 years, 11 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
« no previous file with comments | « core/include/fxcrt/fx_basic.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp » ('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 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 CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ 7 #ifndef CORE_INCLUDE_FXCRT_FX_SYSTEM_H_
8 #define CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ 8 #define CORE_INCLUDE_FXCRT_FX_SYSTEM_H_
9 9
10 #include <assert.h> 10 #include <assert.h>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 #define FXSYS_assert assert 104 #define FXSYS_assert assert
105 #ifndef ASSERT 105 #ifndef ASSERT
106 #ifdef _DEBUG 106 #ifdef _DEBUG
107 #define ASSERT FXSYS_assert 107 #define ASSERT FXSYS_assert
108 #else 108 #else
109 #define ASSERT(a) 109 #define ASSERT(a)
110 #endif 110 #endif
111 #endif 111 #endif
112 112
113 #define FX_MAX(a, b) (((a) > (b)) ? (a) : (b))
114 #define FX_MIN(a, b) (((a) < (b)) ? (a) : (b)) 113 #define FX_MIN(a, b) (((a) < (b)) ? (a) : (b))
115 #define FX_PI 3.1415926535897932384626433832795f 114 #define FX_PI 3.1415926535897932384626433832795f
116 115
117 // NOTE: prevent use of the return value from snprintf() since some platforms 116 // NOTE: prevent use of the return value from snprintf() since some platforms
118 // have different return values (e.g. windows _vsnprintf()), and provide 117 // have different return values (e.g. windows _vsnprintf()), and provide
119 // versions that always NUL-terminate. 118 // versions that always NUL-terminate.
120 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900 119 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900
121 void FXSYS_snprintf(char* str, 120 void FXSYS_snprintf(char* str,
122 size_t size, 121 size_t size,
123 _Printf_format_string_ const char* fmt, 122 _Printf_format_string_ const char* fmt,
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 311
313 // Prevent a function from ever being inlined, typically because we'd 312 // Prevent a function from ever being inlined, typically because we'd
314 // like it to appear in stack traces. 313 // like it to appear in stack traces.
315 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 314 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
316 #define NEVER_INLINE __declspec(noinline) 315 #define NEVER_INLINE __declspec(noinline)
317 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 316 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
318 #define NEVER_INLINE __attribute__((__noinline__)) 317 #define NEVER_INLINE __attribute__((__noinline__))
319 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 318 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
320 319
321 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ 320 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_
OLDNEW
« no previous file with comments | « core/include/fxcrt/fx_basic.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698