From f94d87b00fe384df055d197fe957db083e4fd3c6 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 13 Jun 2025 19:31:03 +0200 Subject: Core/Scripts: Mark script base class constructors noexcept --- src/server/game/Scripting/ScriptMgr.h | 86 +++++++++++++++++------------------ 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'src/server/game/Scripting/ScriptMgr.h') diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 56c6c7d5ca7..482d687f659 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -188,7 +188,7 @@ class TC_GAME_API ScriptObject protected: - ScriptObject(char const* name); + explicit ScriptObject(char const* name) noexcept; virtual ~ScriptObject(); private: @@ -200,7 +200,7 @@ class TC_GAME_API SpellScriptLoader : public ScriptObject { protected: - explicit SpellScriptLoader(char const* name); + explicit SpellScriptLoader(char const* name) noexcept; public: @@ -215,7 +215,7 @@ class TC_GAME_API ServerScript : public ScriptObject { protected: - explicit ServerScript(char const* name); + explicit ServerScript(char const* name) noexcept; public: @@ -247,7 +247,7 @@ class TC_GAME_API WorldScript : public ScriptObject { protected: - explicit WorldScript(char const* name); + explicit WorldScript(char const* name) noexcept; public: @@ -282,7 +282,7 @@ class TC_GAME_API FormulaScript : public ScriptObject { protected: - explicit FormulaScript(char const* name); + explicit FormulaScript(char const* name) noexcept; public: @@ -317,7 +317,7 @@ class TC_GAME_API MapScript protected: - explicit MapScript(MapEntry const* mapEntry); + explicit MapScript(MapEntry const* mapEntry) noexcept; public: @@ -348,7 +348,7 @@ class TC_GAME_API WorldMapScript : public ScriptObject, public MapScript { protected: - explicit WorldMapScript(char const* name, uint32 mapId); + explicit WorldMapScript(char const* name, uint32 mapId) noexcept; public: @@ -359,7 +359,7 @@ class TC_GAME_API InstanceMapScript : public ScriptObject, public MapScript class GenericCreatureScript : public CreatureScript { public: - GenericCreatureScript(char const* name) : CreatureScript(name) { } + GenericCreatureScript(char const* name) noexcept : CreatureScript(name) { } CreatureAI* GetAI(Creature* me) const override { return new AI(me); } }; #define RegisterCreatureAI(ai_name) new GenericCreatureScript(#ai_name) @@ -1376,7 +1376,7 @@ template class FactoryCreatureScript : public CreatureScript { public: - FactoryCreatureScript(char const* name) : CreatureScript(name) { } + FactoryCreatureScript(char const* name) noexcept : CreatureScript(name) { } CreatureAI* GetAI(Creature* me) const override { return AIFactory(me); } }; #define RegisterCreatureAIWithFactory(ai_name, factory_fn) new FactoryCreatureScript(#ai_name) @@ -1385,7 +1385,7 @@ template class GenericGameObjectScript : public GameObjectScript { public: - GenericGameObjectScript(char const* name) : GameObjectScript(name) { } + GenericGameObjectScript(char const* name) noexcept : GameObjectScript(name) { } GameObjectAI* GetAI(GameObject* go) const override { return new AI(go); } }; #define RegisterGameObjectAI(ai_name) new GenericGameObjectScript(#ai_name) @@ -1394,7 +1394,7 @@ template class FactoryGameObjectScript : public GameObjectScript { public: - FactoryGameObjectScript(char const* name) : GameObjectScript(name) { } + FactoryGameObjectScript(char const* name) noexcept : GameObjectScript(name) { } GameObjectAI* GetAI(GameObject* me) const override { return AIFactory(me); } }; #define RegisterGameObjectAIWithFactory(ai_name, factory_fn) new FactoryGameObjectScript(#ai_name) @@ -1403,7 +1403,7 @@ template class GenericAreaTriggerEntityScript : public AreaTriggerEntityScript { public: - GenericAreaTriggerEntityScript(char const* name) : AreaTriggerEntityScript(name) { } + GenericAreaTriggerEntityScript(char const* name) noexcept : AreaTriggerEntityScript(name) { } AreaTriggerAI* GetAI(AreaTrigger* at) const override { return new AI(at); } }; #define RegisterAreaTriggerAI(ai_name) new GenericAreaTriggerEntityScript(#ai_name) @@ -1412,7 +1412,7 @@ template class GenericConversationScript : public ConversationScript { public: - GenericConversationScript(char const* name) : ConversationScript(name) {} + GenericConversationScript(char const* name) noexcept : ConversationScript(name) {} ConversationAI* GetAI(Conversation* conversation) const override { return new AI(conversation); } }; #define RegisterConversationAI(ai_name) new GenericConversationScript(#ai_name) @@ -1421,7 +1421,7 @@ template class GenericBattlegroundMapScript : public BattlegroundMapScript { public: - GenericBattlegroundMapScript(char const* name, uint32 mapId) : BattlegroundMapScript(name, mapId) { } + GenericBattlegroundMapScript(char const* name, uint32 mapId) noexcept : BattlegroundMapScript(name, mapId) { } BattlegroundScript* GetBattlegroundScript(BattlegroundMap* map) const override { return new Script(map); } }; -- cgit v1.2.3