mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-12 06:37:28 +00:00
Fixed all clang -Wreserved-id-macro warnings (on macOS at least)
Avoid defining various reserved identifiers (starting with underscore and capital letter). Fortunately, they were all Windows-only, so it was easy to conditionalize them in Window-only preprocessor checks.
This commit is contained in:
parent
17dda58391
commit
b591fc87dc
@ -6,7 +6,7 @@
|
|||||||
// For the license information refer to format.h.
|
// For the license information refer to format.h.
|
||||||
|
|
||||||
// Disable bogus MSVC warnings.
|
// Disable bogus MSVC warnings.
|
||||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
#if !defined(_CRT_SECURE_NO_WARNINGS) && defined(_MSC_VER)
|
||||||
# define _CRT_SECURE_NO_WARNINGS
|
# define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,9 +15,6 @@
|
|||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# include <crtdbg.h>
|
# include <crtdbg.h>
|
||||||
#else
|
|
||||||
# define _CrtSetReportFile(a, b)
|
|
||||||
# define _CrtSetReportMode(a, b)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
@ -28,11 +25,13 @@ int main(int argc, char** argv) {
|
|||||||
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX |
|
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX |
|
||||||
SEM_NOOPENFILEERRORBOX);
|
SEM_NOOPENFILEERRORBOX);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
// Disable message boxes on assertion failures.
|
// Disable message boxes on assertion failures.
|
||||||
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
|
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
|
||||||
_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
|
_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
|
||||||
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
|
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
|
||||||
_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
|
_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
|
||||||
|
#endif
|
||||||
try {
|
try {
|
||||||
testing::InitGoogleTest(&argc, argv);
|
testing::InitGoogleTest(&argc, argv);
|
||||||
testing::FLAGS_gtest_death_test_style = "threadsafe";
|
testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
Loading…
Reference in New Issue
Block a user