From ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 30 Aug 2017 22:51:23 +0300 Subject: Move some variables to better scope. --- src/being/being.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/being') diff --git a/src/being/being.cpp b/src/being/being.cpp index be998d05d..f924c4b47 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -676,9 +676,6 @@ void Being::takeDamage(Being *restrict const attacker, BLOCK_START("Being::takeDamage1") Font *font = nullptr; - const std::string damage = amount != 0 ? toString(amount) : - // TRANSLATORS: dodge or miss message in attacks - type == AttackType::FLEE ? _("dodge") : _("miss"); const Color *color; if (gui != nullptr) @@ -766,6 +763,9 @@ void Being::takeDamage(Being *restrict const attacker, } if (font != nullptr && particleEngine != nullptr) { + const std::string damage = amount != 0 ? toString(amount) : + // TRANSLATORS: dodge or miss message in attacks + type == AttackType::FLEE ? _("dodge") : _("miss"); // Show damage number particleEngine->addTextSplashEffect(damage, mPixelX, -- cgit v1.2.3-70-g09d2