aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Examples
diff options
context:
space:
mode:
authorPraetonus <praetonus@gmail.com>2014-05-14 16:42:34 +0200
committerPraetonus <praetonus@gmail.com>2014-05-15 21:32:47 +0200
commitf296095191c7b5c6b10f79c2b1433dc227a462f5 (patch)
tree2be2a3ee995851f2212c985c358e96c032a9096d /src/server/scripts/Examples
parent9d760098a5a1bf5203fce8e3ba7b462a7885ee75 (diff)
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<int>::max(). -Remove useless null-check on pointer returned by new. New doesn't returns nullptr on failure, it throws std::bad_alloc.
Diffstat (limited to 'src/server/scripts/Examples')
-rw-r--r--src/server/scripts/Examples/example_spell.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp
index 9097f7cd650..28c2a0cf71e 100644
--- a/src/server/scripts/Examples/example_spell.cpp
+++ b/src/server/scripts/Examples/example_spell.cpp
@@ -43,7 +43,7 @@ class spell_ex_5581 : public SpellScriptLoader
// initialize script, this macro does compile time check for type of the function - prevents possible issues
// if you have assigned wrong type of function to a hook you'll receive type conversion error during build
// this line is required, otherwise you'll get XXXHandlerFunction - identifier not found errors
- PrepareSpellScript(spell_ex_5581SpellScript);
+ PrepareSpellScript(spell_ex_5581SpellScript)
std::string localVariable;
char* localVariable2;
@@ -205,7 +205,7 @@ class spell_ex_66244 : public SpellScriptLoader
class spell_ex_66244AuraScript : public AuraScript
{
- PrepareAuraScript(spell_ex_66244AuraScript);
+ PrepareAuraScript(spell_ex_66244AuraScript)
// function called on server startup
// checks if script has data required for it to work
bool Validate(SpellInfo const* /*spellInfo*/) override
@@ -364,7 +364,7 @@ class spell_ex_absorb_aura : public SpellScriptLoader
class spell_ex_absorb_auraAuraScript : public AuraScript
{
- PrepareAuraScript(spell_ex_absorb_auraAuraScript);
+ PrepareAuraScript(spell_ex_absorb_auraAuraScript)
void HandleOnEffectAbsorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
{
@@ -400,7 +400,7 @@ class spell_ex_463 : public SpellScriptLoader
class spell_ex_463AuraScript : public AuraScript
{
- PrepareAuraScript(spell_ex_463AuraScript);
+ PrepareAuraScript(spell_ex_463AuraScript)
bool CheckAreaTarget(Unit* target)
{
@@ -438,7 +438,7 @@ class spell_ex : public SpellScriptLoader
class spell_ex_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_ex_SpellScript);
+ PrepareSpellScript(spell_ex_SpellScript)
//bool Validate(SpellInfo const* spellEntry){return true;} override
//bool Load(){return true;}