From dda161138b3e48e9d1f01f7de07e4347691e9f69 Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Thu, 4 Mar 2021 11:09:32 +0100 Subject: REFAC: Make sure all macros are #undef'd again If they are not there is the potential of name clashes when performing a unity build. See: https://stackoverflow.com/questions/847974/the-benefits-disadvantages-of-unity-builds --- src/tests/Collections.cpp | 3 +++ src/tests/Hash.cpp | 2 ++ src/tests/Lock.cpp | 2 ++ src/tests/Resample.cpp | 3 +++ src/tests/TestLink.cpp | 2 ++ 5 files changed, 12 insertions(+) (limited to 'src/tests') diff --git a/src/tests/Collections.cpp b/src/tests/Collections.cpp index ef6a5228d..8703ab41e 100644 --- a/src/tests/Collections.cpp +++ b/src/tests/Collections.cpp @@ -120,3 +120,6 @@ int main(int argc, char **argv) { } qWarning("QListSet: %lldus insert, %lldus iterate: %d", usins, usiter, sum); } + +#undef SL +#undef NE diff --git a/src/tests/Hash.cpp b/src/tests/Hash.cpp index 6f4908b04..91065721d 100644 --- a/src/tests/Hash.cpp +++ b/src/tests/Hash.cpp @@ -85,3 +85,5 @@ int main(int argc, char **argv) { } #include "Hash.moc" + +#undef ITER diff --git a/src/tests/Lock.cpp b/src/tests/Lock.cpp index 26897f5cb..c862f0ab2 100644 --- a/src/tests/Lock.cpp +++ b/src/tests/Lock.cpp @@ -111,3 +111,5 @@ int main(int argc, char **argv) { } // #include "Lock.moc" + +#undef ITER diff --git a/src/tests/Resample.cpp b/src/tests/Resample.cpp index cb0c72d90..ec0f256cd 100644 --- a/src/tests/Resample.cpp +++ b/src/tests/Resample.cpp @@ -131,3 +131,6 @@ int main(int argc, char **argv) { return 0; } + +#undef _USE_MATH_DEFINES +#undef ITER diff --git a/src/tests/TestLink.cpp b/src/tests/TestLink.cpp index 10f1f6a28..cc2faea47 100644 --- a/src/tests/TestLink.cpp +++ b/src/tests/TestLink.cpp @@ -152,3 +152,5 @@ int main(int argc, char **argv) { #endif } } + +#undef _CRT_SECURE_NO_WARNINGS -- cgit v1.2.3