From f296095191c7b5c6b10f79c2b1433dc227a462f5 Mon Sep 17 00:00:00 2001 From: Praetonus Date: Wed, 14 May 2014 16:42:34 +0200 Subject: Fix various warnings. The core, the scripts and the tools now compile without warnings with -Wall -Wextra -pedantic. -Fix warnings from -Woverflow on implicit constant conversion. -Fix warnings from -pedantic. -Fix warnings from -pedantic. -Fix warnings from -Wformat. Two minor changes in addition : -Replace a defined value equal to 2^31 - 1 by std::numeric_limits::max(). -Remove useless null-check on pointer returned by new. New doesn't returns nullptr on failure, it throws std::bad_alloc. --- src/server/scripts/World/boss_emerald_dragons.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/scripts/World') diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp index 362c02e1af5..900c43d329f 100644 --- a/src/server/scripts/World/boss_emerald_dragons.cpp +++ b/src/server/scripts/World/boss_emerald_dragons.cpp @@ -687,7 +687,7 @@ class spell_dream_fog_sleep : public SpellScriptLoader class spell_dream_fog_sleep_SpellScript : public SpellScript { - PrepareSpellScript(spell_dream_fog_sleep_SpellScript); + PrepareSpellScript(spell_dream_fog_sleep_SpellScript) void FilterTargets(std::list& targets) { @@ -731,7 +731,7 @@ class spell_mark_of_nature : public SpellScriptLoader class spell_mark_of_nature_SpellScript : public SpellScript { - PrepareSpellScript(spell_mark_of_nature_SpellScript); + PrepareSpellScript(spell_mark_of_nature_SpellScript) bool Validate(SpellInfo const* /*spellInfo*/) override { @@ -781,4 +781,4 @@ void AddSC_emerald_dragons() // dragon spellscripts new spell_dream_fog_sleep(); new spell_mark_of_nature(); -}; +} -- cgit v1.2.3