From 4179dacce438e70e9c754c21f5338a0943b57582 Mon Sep 17 00:00:00 2001 From: Cameron Angus Date: Sat, 7 Dec 2019 18:06:01 +0000 Subject: [PATCH 1/2] Fixed preprocessor directive for when no system defines exist. --- include/uuid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uuid.h b/include/uuid.h index 34f59e5..1cbdb0e 100644 --- a/include/uuid.h +++ b/include/uuid.h @@ -688,7 +688,7 @@ namespace uuids bytes.byte15 } }; return uuid{ std::begin(arrbytes), std::end(arrbytes) }; -#elif +#else return uuid{}; #endif } From 6bd1e3bb7891e717b1e6d09c5269592555f23b64 Mon Sep 17 00:00:00 2001 From: Cameron Angus Date: Sat, 7 Dec 2019 18:10:51 +0000 Subject: [PATCH 2/2] Moved Windows defines before objbase.h includes, since it can include windows.h. Wrapped defines in order to avoid redefinition warnings/errors under strict compilation settings. --- include/uuid.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/uuid.h b/include/uuid.h index 1cbdb0e..1663375 100644 --- a/include/uuid.h +++ b/include/uuid.h @@ -18,10 +18,13 @@ #include #ifdef _WIN32 -#include - -#define WIN32_LEAN_AND_MEAN +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#ifndef NOMINMAX #define NOMINMAX +#endif +#include #include #include #include