From 3235a99ff6ca9b9fc8ae425f02ff61ca6709046e Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 18 Jul 2020 13:19:35 +0200 Subject: [PATCH] Fixed issue on build with gcc. --- extern/angelscript_addons/scriptarray/scriptarray.h | 3 --- .../angelscript_addons/scriptbuilder/scriptbuilder.h | 3 --- extern/angelscript_addons/scripthandle/scripthandle.h | 3 --- extern/angelscript_addons/scripthelper/scripthelper.h | 3 --- .../scriptstdstring/scriptstdstring.h | 3 --- src/Battling/PkmnScript.hpp | 10 ++++++++++ src/ScriptResolving/AngelScript/AngelScriptScript.hpp | 5 ----- .../AngelScript/AngelScriptTypeInfo.hpp | 3 --- src/ScriptResolving/AngelScript/ContextPool.hpp | 3 --- .../AngelScript/TypeRegistry/BasicScriptClass.hpp | 3 --- .../TypeRegistry/Battling/RegisterBattleClass.hpp | 3 --- .../TypeRegistry/Battling/RegisterBattleLibrary.hpp | 3 --- .../TypeRegistry/Battling/RegisterExecutingAttack.hpp | 4 +--- .../TypeRegistry/Battling/RegisterPokemonClass.hpp | 3 --- .../TypeRegistry/Battling/RegisterTurnChoices.hpp | 3 --- .../AngelScript/TypeRegistry/ConstString.hpp | 4 +--- .../TypeRegistry/Library/RegisterEffectParameter.hpp | 3 --- .../TypeRegistry/Library/RegisterGrowthRateTypes.hpp | 4 +--- .../TypeRegistry/Library/RegisterItemTypes.hpp | 4 +--- .../TypeRegistry/Library/RegisterMoveTypes.hpp | 4 +--- .../TypeRegistry/Library/RegisterSpeciesTypes.hpp | 4 +--- .../Library/RegisterStaticLibraryTypes.hpp | 3 --- .../TypeRegistry/Library/RegisterTypeLibrary.hpp | 4 +--- 23 files changed, 17 insertions(+), 68 deletions(-) diff --git a/extern/angelscript_addons/scriptarray/scriptarray.h b/extern/angelscript_addons/scriptarray/scriptarray.h index bf6f35b..41b34dd 100644 --- a/extern/angelscript_addons/scriptarray/scriptarray.h +++ b/extern/angelscript_addons/scriptarray/scriptarray.h @@ -3,10 +3,7 @@ #ifndef ANGELSCRIPT_H // Avoid having to inform include path if header is already include before -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop #endif // Sometimes it may be desired to use the same method names as used by C++ STL. diff --git a/extern/angelscript_addons/scriptbuilder/scriptbuilder.h b/extern/angelscript_addons/scriptbuilder/scriptbuilder.h index 199cbea..4326f7c 100644 --- a/extern/angelscript_addons/scriptbuilder/scriptbuilder.h +++ b/extern/angelscript_addons/scriptbuilder/scriptbuilder.h @@ -20,10 +20,7 @@ #ifndef ANGELSCRIPT_H // Avoid having to inform include path if header is already include before -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop #endif #if defined(_MSC_VER) && _MSC_VER <= 1200 diff --git a/extern/angelscript_addons/scripthandle/scripthandle.h b/extern/angelscript_addons/scripthandle/scripthandle.h index c9cbbcd..7adf1b7 100644 --- a/extern/angelscript_addons/scripthandle/scripthandle.h +++ b/extern/angelscript_addons/scripthandle/scripthandle.h @@ -3,10 +3,7 @@ #ifndef ANGELSCRIPT_H // Avoid having to inform include path if header is already include before -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop #endif diff --git a/extern/angelscript_addons/scripthelper/scripthelper.h b/extern/angelscript_addons/scripthelper/scripthelper.h index 06aa3e9..dc3e0b8 100644 --- a/extern/angelscript_addons/scripthelper/scripthelper.h +++ b/extern/angelscript_addons/scripthelper/scripthelper.h @@ -6,10 +6,7 @@ #ifndef ANGELSCRIPT_H // Avoid having to inform include path if header is already include before -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop #endif diff --git a/extern/angelscript_addons/scriptstdstring/scriptstdstring.h b/extern/angelscript_addons/scriptstdstring/scriptstdstring.h index 461c280..0960beb 100644 --- a/extern/angelscript_addons/scriptstdstring/scriptstdstring.h +++ b/extern/angelscript_addons/scriptstdstring/scriptstdstring.h @@ -13,10 +13,7 @@ #ifndef ANGELSCRIPT_H // Avoid having to inform include path if header is already include before -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop #endif #include diff --git a/src/Battling/PkmnScript.hpp b/src/Battling/PkmnScript.hpp index 5d3988a..fbbeeec 100644 --- a/src/Battling/PkmnScript.hpp +++ b/src/Battling/PkmnScript.hpp @@ -2,8 +2,13 @@ #define PKMNLIB_PKMNSCRIPT_HPP #include +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-parameter" +#elif defined __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif namespace PkmnLib::Battling { class PkmnScript : public CreatureLib::Battling::Script { @@ -22,6 +27,11 @@ namespace PkmnLib::Battling { CreatureLib::Battling::Creature* winningMon, bool* shareExperience){}; }; } + +#ifdef __clang__ #pragma clang diagnostic pop +#elif defined __GNUC__ +#pragma GCC diagnostic pop +#endif #endif // PKMNLIB_PKMNSCRIPT_HPP diff --git a/src/ScriptResolving/AngelScript/AngelScriptScript.hpp b/src/ScriptResolving/AngelScript/AngelScriptScript.hpp index 8aba3a3..9c806d7 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptScript.hpp +++ b/src/ScriptResolving/AngelScript/AngelScriptScript.hpp @@ -3,12 +3,7 @@ #include #define ANGELSCRIPT_DLL_LIBRARY_IMPORT #include - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop - #include #include "../../../extern/angelscript_addons/scriptarray/scriptarray.h" #include "../../Battling/PkmnScript.hpp" diff --git a/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp b/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp index 51806c3..b2d6940 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp +++ b/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp @@ -5,10 +5,7 @@ #include #include #include -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop #include #include #include diff --git a/src/ScriptResolving/AngelScript/ContextPool.hpp b/src/ScriptResolving/AngelScript/ContextPool.hpp index 68afb51..3653aee 100644 --- a/src/ScriptResolving/AngelScript/ContextPool.hpp +++ b/src/ScriptResolving/AngelScript/ContextPool.hpp @@ -1,10 +1,7 @@ #ifndef PKMNLIB_CONTEXTPOOL_HPP #define PKMNLIB_CONTEXTPOOL_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop #include class ContextPool { diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.hpp index 014b80a..a9962ea 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.hpp @@ -1,10 +1,7 @@ #ifndef PKMNLIB_BASICSCRIPTCLASS_HPP #define PKMNLIB_BASICSCRIPTCLASS_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop class BasicScriptClass { public: diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.hpp index 331718d..bfa991e 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.hpp @@ -1,10 +1,7 @@ #ifndef PKMNLIB_REGISTERBATTLECLASS_HPP #define PKMNLIB_REGISTERBATTLECLASS_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop class RegisterBattleClass { static void RegisterChoiceQueue(asIScriptEngine* engine); static void RegisterBattle(asIScriptEngine* engine); diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleLibrary.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleLibrary.hpp index da8f0fe..7b60480 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleLibrary.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleLibrary.hpp @@ -1,10 +1,7 @@ #ifndef PKMNLIB_REGISTERBATTLELIBRARY_HPP #define PKMNLIB_REGISTERBATTLELIBRARY_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop class RegisterBattleLibrary { static void RegisterDamageLibrary(asIScriptEngine* engine); diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.hpp index d640884..3099730 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.hpp @@ -1,9 +1,7 @@ #ifndef PKMNLIB_REGISTEREXECUTINGATTACK_HPP #define PKMNLIB_REGISTEREXECUTINGATTACK_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" + #include -#pragma clang diagnostic pop class RegisterExecutingAttack { static void RegisterHitData(asIScriptEngine* engine); diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.hpp index 1daed66..fca53ad 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.hpp @@ -1,10 +1,7 @@ #ifndef PKMNLIB_REGISTERPOKEMONCLASS_HPP #define PKMNLIB_REGISTERPOKEMONCLASS_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop class RegisterPokemonClass { static void RegisterDamageSource(asIScriptEngine* engine); diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterTurnChoices.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterTurnChoices.hpp index d6db193..1dc5448 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterTurnChoices.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterTurnChoices.hpp @@ -1,10 +1,7 @@ #ifndef PKMNLIB_REGISTERTURNCHOICES_HPP #define PKMNLIB_REGISTERTURNCHOICES_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop class RegisterTurnChoices { static void RegisterTurnChoiceKindEnum(asIScriptEngine* engine); diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.hpp index 915a503..00cbce7 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.hpp @@ -1,10 +1,8 @@ #ifndef PKMNLIB_CONSTSTRING_HPP #define PKMNLIB_CONSTSTRING_HPP + #include -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop class ConstStringRegister { public: diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterEffectParameter.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterEffectParameter.hpp index 516252f..3a8e7e2 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterEffectParameter.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterEffectParameter.hpp @@ -1,10 +1,7 @@ #ifndef PKMNLIB_REGISTEREFFECTPARAMETER_HPP #define PKMNLIB_REGISTEREFFECTPARAMETER_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop class RegisterEffectParameter { public: diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterGrowthRateTypes.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterGrowthRateTypes.hpp index 5ae1ae8..4179f17 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterGrowthRateTypes.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterGrowthRateTypes.hpp @@ -1,9 +1,7 @@ #ifndef PKMNLIB_REGISTERGROWTHRATETYPES_HPP #define PKMNLIB_REGISTERGROWTHRATETYPES_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" + #include -#pragma clang diagnostic pop class RegisterGrowthRateTypes { static void RegisterGrowthRateType(asIScriptEngine* engine); diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterItemTypes.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterItemTypes.hpp index db6c935..e99942c 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterItemTypes.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterItemTypes.hpp @@ -1,9 +1,7 @@ #ifndef PKMNLIB_REGISTERITEMTYPES_HPP #define PKMNLIB_REGISTERITEMTYPES_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" + #include -#pragma clang diagnostic pop class RegisterItemTypes { static void RegisterItemCategoryEnum(asIScriptEngine* engine); diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterMoveTypes.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterMoveTypes.hpp index b133365..4dbd798 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterMoveTypes.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterMoveTypes.hpp @@ -1,9 +1,7 @@ #ifndef PKMNLIB_REGISTERMOVETYPES_HPP #define PKMNLIB_REGISTERMOVETYPES_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" + #include -#pragma clang diagnostic pop class RegisterMoveTypes { static void RegisterMoveCategory(asIScriptEngine* engine); diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterSpeciesTypes.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterSpeciesTypes.hpp index 1a36435..97bf96d 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterSpeciesTypes.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterSpeciesTypes.hpp @@ -1,9 +1,7 @@ #ifndef PKMNLIB_REGISTERSPECIESTYPES_HPP #define PKMNLIB_REGISTERSPECIESTYPES_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" + #include -#pragma clang diagnostic pop class RegisterSpeciesTypes { public: diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterStaticLibraryTypes.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterStaticLibraryTypes.hpp index a9822f9..7fd4fa3 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterStaticLibraryTypes.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterStaticLibraryTypes.hpp @@ -1,10 +1,7 @@ #ifndef PKMNLIB_REGISTERSTATICLIBRARYTYPES_HPP #define PKMNLIB_REGISTERSTATICLIBRARYTYPES_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" #include -#pragma clang diagnostic pop class RegisterStaticLibraryTypes { static void RegisterLibrarySettingsType(asIScriptEngine* engine); diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterTypeLibrary.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterTypeLibrary.hpp index 36ec8b4..cbc71bc 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterTypeLibrary.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterTypeLibrary.hpp @@ -1,9 +1,7 @@ #ifndef PKMNLIB_REGISTERTYPELIBRARY_HPP #define PKMNLIB_REGISTERTYPELIBRARY_HPP -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" + #include -#pragma clang diagnostic pop class RegisterTypeLibrary { static void RegisterTypeLibraryType(asIScriptEngine* engine);