From 4c659a6442f85f8ff9f67faec888305b73d29aed Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 4 Feb 2015 21:59:45 +0100 Subject: [PATCH] Fixed potential name conflict with user's code Former-commit-id: ca4e2ec3973d45832fc6a6535750b2639f65fe23 --- include/Nazara/Audio/ConfigCheck.hpp | 6 ++++-- include/Nazara/Core/ConfigCheck.hpp | 10 ++++++---- include/Nazara/Graphics/ConfigCheck.hpp | 8 +++++--- include/Nazara/Renderer/ConfigCheck.hpp | 6 ++++-- include/Nazara/Utility/ConfigCheck.hpp | 6 ++++-- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/include/Nazara/Audio/ConfigCheck.hpp b/include/Nazara/Audio/ConfigCheck.hpp index 7c32933bd..546f77dd0 100644 --- a/include/Nazara/Audio/ConfigCheck.hpp +++ b/include/Nazara/Audio/ConfigCheck.hpp @@ -10,7 +10,7 @@ /// Ce fichier sert à vérifier la valeur des constantes du fichier Config.hpp #include -#define CheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type ::value && name op val, #type err) +#define NazaraCheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type ::value && name op val, #type err) // On force la valeur de MANAGE_MEMORY en mode debug #if defined(NAZARA_DEBUG) && !NAZARA_AUDIO_MANAGE_MEMORY @@ -18,6 +18,8 @@ #define NAZARA_AUDIO_MANAGE_MEMORY 1 #endif -CheckTypeAndVal(NAZARA_AUDIO_STREAMED_BUFFER_COUNT, integral, >, 0, " shall be a strictly positive integer"); +NazaraCheckTypeAndVal(NAZARA_AUDIO_STREAMED_BUFFER_COUNT, integral, >, 0, " shall be a strictly positive integer"); + +#undef NazaraCheckTypeAndVal #endif // NAZARA_CONFIG_CHECK_AUDIO_HPP diff --git a/include/Nazara/Core/ConfigCheck.hpp b/include/Nazara/Core/ConfigCheck.hpp index 503152153..4e02a55de 100644 --- a/include/Nazara/Core/ConfigCheck.hpp +++ b/include/Nazara/Core/ConfigCheck.hpp @@ -10,7 +10,7 @@ /// Ce fichier sert à vérifier la valeur des constantes du fichier Config.hpp #include -#define CheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type ::value && name op val, #type err) +#define NazaraCheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type ::value && name op val, #type err) // On force la valeur de MANAGE_MEMORY en mode debug #if defined(NAZARA_DEBUG) && !NAZARA_CORE_MANAGE_MEMORY @@ -18,8 +18,10 @@ #define NAZARA_CORE_MANAGE_MEMORY 1 #endif -CheckTypeAndVal(NAZARA_CORE_DECIMAL_DIGITS, integral, >, 0, " shall be a strictly positive integer"); -CheckTypeAndVal(NAZARA_CORE_FILE_BUFFERSIZE, integral, >, 0, " shall be a strictly positive integer"); -CheckTypeAndVal(NAZARA_CORE_WINDOWS_CS_SPINLOCKS, integral, >=, 0, " shall be a positive integer"); +NazaraCheckTypeAndVal(NAZARA_CORE_DECIMAL_DIGITS, integral, >, 0, " shall be a strictly positive integer"); +NazaraCheckTypeAndVal(NAZARA_CORE_FILE_BUFFERSIZE, integral, >, 0, " shall be a strictly positive integer"); +NazaraCheckTypeAndVal(NAZARA_CORE_WINDOWS_CS_SPINLOCKS, integral, >=, 0, " shall be a positive integer"); + +#undef NazaraCheckTypeAndVal #endif // NAZARA_CONFIG_CHECK_CORE_HPP diff --git a/include/Nazara/Graphics/ConfigCheck.hpp b/include/Nazara/Graphics/ConfigCheck.hpp index 98fee1840..1365688ac 100644 --- a/include/Nazara/Graphics/ConfigCheck.hpp +++ b/include/Nazara/Graphics/ConfigCheck.hpp @@ -10,7 +10,7 @@ /// Ce fichier sert à vérifier la valeur des constantes du fichier Config.hpp #include -#define CheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type ::value && name op val, #type err) +#define NazaraCheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type ::value && name op val, #type err) // On force la valeur de MANAGE_MEMORY en mode debug #if defined(NAZARA_DEBUG) && !NAZARA_GRAPHICS_MANAGE_MEMORY @@ -18,7 +18,9 @@ #define NAZARA_GRAPHICS_MANAGE_MEMORY 1 #endif -CheckTypeAndVal(NAZARA_GRAPHICS_INSTANCING_MIN_INSTANCES_COUNT, integral, >, 0, " shall be a strictly positive integer"); -CheckTypeAndVal(NAZARA_GRAPHICS_MAX_LIGHT_PER_PASS, integral, >, 0, " shall be a strictly positive integer"); +NazaraCheckTypeAndVal(NAZARA_GRAPHICS_INSTANCING_MIN_INSTANCES_COUNT, integral, >, 0, " shall be a strictly positive integer"); +NazaraCheckTypeAndVal(NAZARA_GRAPHICS_MAX_LIGHT_PER_PASS, integral, >, 0, " shall be a strictly positive integer"); + +#undef NazaraCheckTypeAndVal #endif // NAZARA_CONFIG_CHECK_GRAPHICS_HPP diff --git a/include/Nazara/Renderer/ConfigCheck.hpp b/include/Nazara/Renderer/ConfigCheck.hpp index 3860a809b..a90e79785 100644 --- a/include/Nazara/Renderer/ConfigCheck.hpp +++ b/include/Nazara/Renderer/ConfigCheck.hpp @@ -10,7 +10,7 @@ /// Ce fichier sert à vérifier la valeur des constantes du fichier Config.hpp #include -#define CheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type ::value && name op val, #type err) +#define NazaraCheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type ::value && name op val, #type err) // On force la valeur de MANAGE_MEMORY en mode debug #if defined(NAZARA_DEBUG) && !NAZARA_RENDERER_MANAGE_MEMORY @@ -18,6 +18,8 @@ #define NAZARA_RENDERER_MANAGE_MEMORY 1 #endif -CheckTypeAndVal(NAZARA_RENDERER_INSTANCE_BUFFER_SIZE, integral, >, 0, " shall be a strictly positive integer"); +NazaraCheckTypeAndVal(NAZARA_RENDERER_INSTANCE_BUFFER_SIZE, integral, >, 0, " shall be a strictly positive integer"); + +#undef NazaraCheckTypeAndVal #endif // NAZARA_CONFIG_CHECK_RENDERER_HPP diff --git a/include/Nazara/Utility/ConfigCheck.hpp b/include/Nazara/Utility/ConfigCheck.hpp index b4c976edc..0018b6e9d 100644 --- a/include/Nazara/Utility/ConfigCheck.hpp +++ b/include/Nazara/Utility/ConfigCheck.hpp @@ -10,7 +10,7 @@ /// Ce fichier sert à vérifier la valeur des constantes du fichier Config.hpp #include -#define CheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type ::value && name op val, #type err) +#define NazaraCheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type ::value && name op val, #type err) // On force la valeur de MANAGE_MEMORY en mode debug #if defined(NAZARA_DEBUG) && !NAZARA_UTILITY_MANAGE_MEMORY @@ -18,6 +18,8 @@ #define NAZARA_UTILITY_MANAGE_MEMORY 1 #endif -CheckTypeAndVal(NAZARA_UTILITY_SKINNING_MAX_WEIGHTS, integral, >, 0, " shall be a strictly positive integer"); +NazaraCheckTypeAndVal(NAZARA_UTILITY_SKINNING_MAX_WEIGHTS, integral, >, 0, " shall be a strictly positive integer"); + +#undef NazaraCheckTypeAndVal #endif // NAZARA_CONFIG_CHECK_UTILITY_HPP