Fixed issue on build with gcc.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2020-07-18 13:19:35 +02:00
parent 7827b8bb2b
commit 3235a99ff6
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
23 changed files with 17 additions and 68 deletions

View File

@ -3,10 +3,7 @@
#ifndef ANGELSCRIPT_H #ifndef ANGELSCRIPT_H
// Avoid having to inform include path if header is already include before // Avoid having to inform include path if header is already include before
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
#endif #endif
// Sometimes it may be desired to use the same method names as used by C++ STL. // Sometimes it may be desired to use the same method names as used by C++ STL.

View File

@ -20,10 +20,7 @@
#ifndef ANGELSCRIPT_H #ifndef ANGELSCRIPT_H
// Avoid having to inform include path if header is already include before // Avoid having to inform include path if header is already include before
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
#endif #endif
#if defined(_MSC_VER) && _MSC_VER <= 1200 #if defined(_MSC_VER) && _MSC_VER <= 1200

View File

@ -3,10 +3,7 @@
#ifndef ANGELSCRIPT_H #ifndef ANGELSCRIPT_H
// Avoid having to inform include path if header is already include before // Avoid having to inform include path if header is already include before
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
#endif #endif

View File

@ -6,10 +6,7 @@
#ifndef ANGELSCRIPT_H #ifndef ANGELSCRIPT_H
// Avoid having to inform include path if header is already include before // Avoid having to inform include path if header is already include before
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
#endif #endif

View File

@ -13,10 +13,7 @@
#ifndef ANGELSCRIPT_H #ifndef ANGELSCRIPT_H
// Avoid having to inform include path if header is already include before // Avoid having to inform include path if header is already include before
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
#endif #endif
#include <string> #include <string>

View File

@ -2,8 +2,13 @@
#define PKMNLIB_PKMNSCRIPT_HPP #define PKMNLIB_PKMNSCRIPT_HPP
#include <CreatureLib/Battling/ScriptHandling/Script.hpp> #include <CreatureLib/Battling/ScriptHandling/Script.hpp>
#ifdef __clang__
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-parameter"
#elif defined __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
namespace PkmnLib::Battling { namespace PkmnLib::Battling {
class PkmnScript : public CreatureLib::Battling::Script { class PkmnScript : public CreatureLib::Battling::Script {
@ -22,6 +27,11 @@ namespace PkmnLib::Battling {
CreatureLib::Battling::Creature* winningMon, bool* shareExperience){}; CreatureLib::Battling::Creature* winningMon, bool* shareExperience){};
}; };
} }
#ifdef __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop
#elif defined __GNUC__
#pragma GCC diagnostic pop
#endif
#endif // PKMNLIB_PKMNSCRIPT_HPP #endif // PKMNLIB_PKMNSCRIPT_HPP

View File

@ -3,12 +3,7 @@
#include <CreatureLib/Battling/ScriptHandling/Script.hpp> #include <CreatureLib/Battling/ScriptHandling/Script.hpp>
#define ANGELSCRIPT_DLL_LIBRARY_IMPORT #define ANGELSCRIPT_DLL_LIBRARY_IMPORT
#include <CreatureLib/Library/Exceptions/NotImplementedException.hpp> #include <CreatureLib/Library/Exceptions/NotImplementedException.hpp>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
#include <cstdint> #include <cstdint>
#include "../../../extern/angelscript_addons/scriptarray/scriptarray.h" #include "../../../extern/angelscript_addons/scriptarray/scriptarray.h"
#include "../../Battling/PkmnScript.hpp" #include "../../Battling/PkmnScript.hpp"

View File

@ -5,10 +5,7 @@
#include <Arbutils/Collections/Dictionary.hpp> #include <Arbutils/Collections/Dictionary.hpp>
#include <Arbutils/StringView.hpp> #include <Arbutils/StringView.hpp>
#include <CreatureLib/Library/Exceptions/CreatureException.hpp> #include <CreatureLib/Library/Exceptions/CreatureException.hpp>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
#include <cstring> #include <cstring>
#include <unordered_map> #include <unordered_map>
#include <utility> #include <utility>

View File

@ -1,10 +1,7 @@
#ifndef PKMNLIB_CONTEXTPOOL_HPP #ifndef PKMNLIB_CONTEXTPOOL_HPP
#define PKMNLIB_CONTEXTPOOL_HPP #define PKMNLIB_CONTEXTPOOL_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
#include <vector> #include <vector>
class ContextPool { class ContextPool {

View File

@ -1,10 +1,7 @@
#ifndef PKMNLIB_BASICSCRIPTCLASS_HPP #ifndef PKMNLIB_BASICSCRIPTCLASS_HPP
#define PKMNLIB_BASICSCRIPTCLASS_HPP #define PKMNLIB_BASICSCRIPTCLASS_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class BasicScriptClass { class BasicScriptClass {
public: public:

View File

@ -1,10 +1,7 @@
#ifndef PKMNLIB_REGISTERBATTLECLASS_HPP #ifndef PKMNLIB_REGISTERBATTLECLASS_HPP
#define PKMNLIB_REGISTERBATTLECLASS_HPP #define PKMNLIB_REGISTERBATTLECLASS_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterBattleClass { class RegisterBattleClass {
static void RegisterChoiceQueue(asIScriptEngine* engine); static void RegisterChoiceQueue(asIScriptEngine* engine);
static void RegisterBattle(asIScriptEngine* engine); static void RegisterBattle(asIScriptEngine* engine);

View File

@ -1,10 +1,7 @@
#ifndef PKMNLIB_REGISTERBATTLELIBRARY_HPP #ifndef PKMNLIB_REGISTERBATTLELIBRARY_HPP
#define PKMNLIB_REGISTERBATTLELIBRARY_HPP #define PKMNLIB_REGISTERBATTLELIBRARY_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterBattleLibrary { class RegisterBattleLibrary {
static void RegisterDamageLibrary(asIScriptEngine* engine); static void RegisterDamageLibrary(asIScriptEngine* engine);

View File

@ -1,9 +1,7 @@
#ifndef PKMNLIB_REGISTEREXECUTINGATTACK_HPP #ifndef PKMNLIB_REGISTEREXECUTINGATTACK_HPP
#define PKMNLIB_REGISTEREXECUTINGATTACK_HPP #define PKMNLIB_REGISTEREXECUTINGATTACK_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterExecutingAttack { class RegisterExecutingAttack {
static void RegisterHitData(asIScriptEngine* engine); static void RegisterHitData(asIScriptEngine* engine);

View File

@ -1,10 +1,7 @@
#ifndef PKMNLIB_REGISTERPOKEMONCLASS_HPP #ifndef PKMNLIB_REGISTERPOKEMONCLASS_HPP
#define PKMNLIB_REGISTERPOKEMONCLASS_HPP #define PKMNLIB_REGISTERPOKEMONCLASS_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterPokemonClass { class RegisterPokemonClass {
static void RegisterDamageSource(asIScriptEngine* engine); static void RegisterDamageSource(asIScriptEngine* engine);

View File

@ -1,10 +1,7 @@
#ifndef PKMNLIB_REGISTERTURNCHOICES_HPP #ifndef PKMNLIB_REGISTERTURNCHOICES_HPP
#define PKMNLIB_REGISTERTURNCHOICES_HPP #define PKMNLIB_REGISTERTURNCHOICES_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterTurnChoices { class RegisterTurnChoices {
static void RegisterTurnChoiceKindEnum(asIScriptEngine* engine); static void RegisterTurnChoiceKindEnum(asIScriptEngine* engine);

View File

@ -1,10 +1,8 @@
#ifndef PKMNLIB_CONSTSTRING_HPP #ifndef PKMNLIB_CONSTSTRING_HPP
#define PKMNLIB_CONSTSTRING_HPP #define PKMNLIB_CONSTSTRING_HPP
#include <Arbutils/Assert.hpp> #include <Arbutils/Assert.hpp>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class ConstStringRegister { class ConstStringRegister {
public: public:

View File

@ -1,10 +1,7 @@
#ifndef PKMNLIB_REGISTEREFFECTPARAMETER_HPP #ifndef PKMNLIB_REGISTEREFFECTPARAMETER_HPP
#define PKMNLIB_REGISTEREFFECTPARAMETER_HPP #define PKMNLIB_REGISTEREFFECTPARAMETER_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterEffectParameter { class RegisterEffectParameter {
public: public:

View File

@ -1,9 +1,7 @@
#ifndef PKMNLIB_REGISTERGROWTHRATETYPES_HPP #ifndef PKMNLIB_REGISTERGROWTHRATETYPES_HPP
#define PKMNLIB_REGISTERGROWTHRATETYPES_HPP #define PKMNLIB_REGISTERGROWTHRATETYPES_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterGrowthRateTypes { class RegisterGrowthRateTypes {
static void RegisterGrowthRateType(asIScriptEngine* engine); static void RegisterGrowthRateType(asIScriptEngine* engine);

View File

@ -1,9 +1,7 @@
#ifndef PKMNLIB_REGISTERITEMTYPES_HPP #ifndef PKMNLIB_REGISTERITEMTYPES_HPP
#define PKMNLIB_REGISTERITEMTYPES_HPP #define PKMNLIB_REGISTERITEMTYPES_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterItemTypes { class RegisterItemTypes {
static void RegisterItemCategoryEnum(asIScriptEngine* engine); static void RegisterItemCategoryEnum(asIScriptEngine* engine);

View File

@ -1,9 +1,7 @@
#ifndef PKMNLIB_REGISTERMOVETYPES_HPP #ifndef PKMNLIB_REGISTERMOVETYPES_HPP
#define PKMNLIB_REGISTERMOVETYPES_HPP #define PKMNLIB_REGISTERMOVETYPES_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterMoveTypes { class RegisterMoveTypes {
static void RegisterMoveCategory(asIScriptEngine* engine); static void RegisterMoveCategory(asIScriptEngine* engine);

View File

@ -1,9 +1,7 @@
#ifndef PKMNLIB_REGISTERSPECIESTYPES_HPP #ifndef PKMNLIB_REGISTERSPECIESTYPES_HPP
#define PKMNLIB_REGISTERSPECIESTYPES_HPP #define PKMNLIB_REGISTERSPECIESTYPES_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterSpeciesTypes { class RegisterSpeciesTypes {
public: public:

View File

@ -1,10 +1,7 @@
#ifndef PKMNLIB_REGISTERSTATICLIBRARYTYPES_HPP #ifndef PKMNLIB_REGISTERSTATICLIBRARYTYPES_HPP
#define PKMNLIB_REGISTERSTATICLIBRARYTYPES_HPP #define PKMNLIB_REGISTERSTATICLIBRARYTYPES_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterStaticLibraryTypes { class RegisterStaticLibraryTypes {
static void RegisterLibrarySettingsType(asIScriptEngine* engine); static void RegisterLibrarySettingsType(asIScriptEngine* engine);

View File

@ -1,9 +1,7 @@
#ifndef PKMNLIB_REGISTERTYPELIBRARY_HPP #ifndef PKMNLIB_REGISTERTYPELIBRARY_HPP
#define PKMNLIB_REGISTERTYPELIBRARY_HPP #define PKMNLIB_REGISTERTYPELIBRARY_HPP
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <angelscript.h> #include <angelscript.h>
#pragma clang diagnostic pop
class RegisterTypeLibrary { class RegisterTypeLibrary {
static void RegisterTypeLibraryType(asIScriptEngine* engine); static void RegisterTypeLibraryType(asIScriptEngine* engine);