diff options
| author | Naios <naios-dev@live.de> | 2015-03-11 08:53:13 +0100 |
|---|---|---|
| committer | Nayd <dnpd.dd@gmail.com> | 2015-03-18 01:13:47 +0000 |
| commit | 301ec0be564a4f160984dc5e34ab5468464dc76e (patch) | |
| tree | e0bd6b16f7a8dd8f1b18607d8ae3a9244a736f28 /src/server/game/Spells/Spell.cpp | |
| parent | a38945a3b324c73bdb96951a1d15c7deaa94df1d (diff) | |
Core/Game: Fix some issues detected by static analysis.
* Possible inefficient checking for 'list' emptiness.
* Variable '_scheduledScripts' is assigned in constructor body.
Consider performing initialization in initialization list.
* Variable 'Text' is assigned in constructor body.
Consider performing initialization in initialization list.
* Possible inefficient checking for 'm_loadedScripts' emptiness.
(cherry picked from commit 9a61049f88835fd6bdb75905f042583d038d0667)
Conflicts:
src/server/game/Server/Packets/TicketPackets.cpp
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index ec0510b70a6..23ab75efc80 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -7140,7 +7140,7 @@ void Spell::CallScriptDestinationTargetSelectHandlers(SpellDestination& target, bool Spell::CheckScriptEffectImplicitTargets(uint32 effIndex, uint32 effIndexToCheck) { // Skip if there are not any script - if (!m_loadedScripts.size()) + if (m_loadedScripts.empty()) return true; for (std::list<SpellScript*>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end(); ++itr) |
