From 93265dbb9c0cb37ca15c64123a74689a048b2bde Mon Sep 17 00:00:00 2001 From: Learath Date: Thu, 25 Apr 2019 20:38:11 +0300 Subject: [PATCH] Please MSVC --- src/base/color.h | 3 +-- src/engine/shared/config.cpp | 4 ++-- src/engine/shared/config.h | 2 +- src/engine/shared/console.cpp | 2 +- src/game/server/teehistorian.cpp | 2 +- src/test/teehistorian.cpp | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/base/color.h b/src/base/color.h index c45737436..962bc5e13 100644 --- a/src/base/color.h +++ b/src/base/color.h @@ -193,8 +193,7 @@ public: float a; using vector3_base::vector3_base; - color4_base() - {} + color4_base() {} color4_base(const vec4 &v4) { diff --git a/src/engine/shared/config.cpp b/src/engine/shared/config.cpp index 193277d22..16704a165 100644 --- a/src/engine/shared/config.cpp +++ b/src/engine/shared/config.cpp @@ -50,7 +50,7 @@ public: virtual void Reset() { #define MACRO_CONFIG_INT(Name,ScriptName,def,min,max,flags,desc) g_Config.m_##Name = def; - #define MACRO_CONFIG_COL(...) MACRO_CONFIG_INT(__VA_ARGS__) + #define MACRO_CONFIG_COL(Name,ScriptName,def,min,max,flags,desc) MACRO_CONFIG_INT(Name,ScriptName,def,min,max,flags,desc) #define MACRO_CONFIG_STR(Name,ScriptName,len,def,flags,desc) str_copy(g_Config.m_##Name, def, len); #include "config_variables.h" @@ -76,7 +76,7 @@ public: char aEscapeBuf[1024*2]; #define MACRO_CONFIG_INT(Name,ScriptName,def,min,max,flags,desc) if((flags)&CFGFLAG_SAVE) { str_format(aLineBuf, sizeof(aLineBuf), "%s %i", #ScriptName, g_Config.m_##Name); WriteLine(aLineBuf); } - #define MACRO_CONFIG_COL(...) MACRO_CONFIG_INT(__VA_ARGS__) + #define MACRO_CONFIG_COL(Name,ScriptName,def,min,max,flags,desc) MACRO_CONFIG_INT(Name,ScriptName,def,min,max,flags,desc) #define MACRO_CONFIG_STR(Name,ScriptName,len,def,flags,desc) if((flags)&CFGFLAG_SAVE) { EscapeParam(aEscapeBuf, g_Config.m_##Name, sizeof(aEscapeBuf)); str_format(aLineBuf, sizeof(aLineBuf), "%s \"%s\"", #ScriptName, aEscapeBuf); WriteLine(aLineBuf); } #include "config_variables.h" diff --git a/src/engine/shared/config.h b/src/engine/shared/config.h index 2c34a536e..e9d885caa 100644 --- a/src/engine/shared/config.h +++ b/src/engine/shared/config.h @@ -12,7 +12,7 @@ struct CConfiguration { #define MACRO_CONFIG_INT(Name,ScriptName,Def,Min,Max,Save,Desc) int m_##Name; - #define MACRO_CONFIG_COL(...) MACRO_CONFIG_INT(__VA_ARGS__) + #define MACRO_CONFIG_COL(Name,ScriptName,Def,Min,Max,Save,Desc) MACRO_CONFIG_INT(Name,ScriptName,Def,Min,Max,Save,Desc) #define MACRO_CONFIG_STR(Name,ScriptName,Len,Def,Save,Desc) char m_##Name[Len]; // Flawfinder: ignore #include "config_variables.h" #undef MACRO_CONFIG_INT diff --git a/src/engine/shared/console.cpp b/src/engine/shared/console.cpp index b716facd4..59815788c 100644 --- a/src/engine/shared/console.cpp +++ b/src/engine/shared/console.cpp @@ -1215,7 +1215,7 @@ void CConsole::ResetServerGameSettings() } \ } - #define MACRO_CONFIG_COL(...) MACRO_CONFIG_INT(__VA_ARGS__) + #define MACRO_CONFIG_COL(Name,ScriptName,Def,Min,Max,Save,Desc) MACRO_CONFIG_INT(Name,ScriptName,Def,Min,Max,Save,Desc) #define MACRO_CONFIG_STR(Name,ScriptName,Len,Def,Flags,Desc) \ { \ diff --git a/src/game/server/teehistorian.cpp b/src/game/server/teehistorian.cpp index 7f036715c..8ace9c753 100644 --- a/src/game/server/teehistorian.cpp +++ b/src/game/server/teehistorian.cpp @@ -115,7 +115,7 @@ void CTeeHistorian::WriteHeader(const CGameInfo *pGameInfo) First = false; \ } - #define MACRO_CONFIG_COL(...) MACRO_CONFIG_INT(__VA_ARGS__) + #define MACRO_CONFIG_COL(Name,ScriptName,Def,Min,Max,Save,Desc) MACRO_CONFIG_INT(Name,ScriptName,Def,Min,Max,Save,Desc) #define MACRO_CONFIG_STR(Name,ScriptName,Len,Def,Flags,Desc) \ if((Flags)&CFGFLAG_SERVER && !((Flags)&CFGFLAG_NONTEEHISTORIC) && str_comp(pGameInfo->m_pConfig->m_##Name, (Def)) != 0) \ diff --git a/src/test/teehistorian.cpp b/src/test/teehistorian.cpp index df3d821b7..a27022f41 100644 --- a/src/test/teehistorian.cpp +++ b/src/test/teehistorian.cpp @@ -33,7 +33,7 @@ protected: mem_zero(&m_Config, sizeof(m_Config)); #define MACRO_CONFIG_INT(Name,ScriptName,Def,Min,Max,Save,Desc) \ m_Config.m_##Name = (Def); - #define MACRO_CONFIG_COL(...) MACRO_CONFIG_INT(__VA_ARGS__) + #define MACRO_CONFIG_COL(Name,ScriptName,Def,Min,Max,Save,Desc) MACRO_CONFIG_INT(Name,ScriptName,Def,Min,Max,Save,Desc) #define MACRO_CONFIG_STR(Name,ScriptName,Len,Def,Save,Desc) \ str_copy(m_Config.m_##Name, (Def), sizeof(m_Config.m_##Name)); #include