diff options
-rw-r--r-- | src/effectmanager.cpp | 9 | ||||
-rw-r--r-- | src/effectmanager.h | 13 |
2 files changed, 14 insertions, 8 deletions
diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp index be7fa1e83..5901e21ea 100644 --- a/src/effectmanager.cpp +++ b/src/effectmanager.cpp @@ -48,11 +48,10 @@ EffectManager::EffectManager() { if (xmlNameEqual(node, "effect")) { - EffectDescription ed; - ed.id = XML::getProperty(node, "id", -1); - ed.GFX = XML::getProperty(node, "particle", ""); - ed.SFX = XML::getProperty(node, "audio", ""); - mEffects.push_back(ed); + mEffects.push_back(EffectDescription( + XML::getProperty(node, "id", -1), + XML::getProperty(node, "particle", ""), + XML::getProperty(node, "audio", ""))); } } } diff --git a/src/effectmanager.h b/src/effectmanager.h index b5d8e5bfc..d8bbd691b 100644 --- a/src/effectmanager.h +++ b/src/effectmanager.h @@ -37,9 +37,16 @@ class EffectManager final public: struct EffectDescription { - int id; - std::string GFX; - std::string SFX; + EffectDescription(int id0, const std::string GFX0, + const std::string SFX0) : + id(id0), + GFX(GFX0), + SFX(SFX0) + { + } + int id; + std::string GFX; + std::string SFX; }; EffectManager(); |