summaryrefslogtreecommitdiff
path: root/src/gui/widgets/icon.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
commitd97189f055798b5b2051c1c5770a3def62747461 (patch)
treed66a891dba33d2ce1c882e0de7d6145bb2e0326b /src/gui/widgets/icon.cpp
parent25dce1399e40f24809842303d48ef090439de1e5 (diff)
downloadmanaverse-d97189f055798b5b2051c1c5770a3def62747461.tar.gz
manaverse-d97189f055798b5b2051c1c5770a3def62747461.tar.bz2
manaverse-d97189f055798b5b2051c1c5770a3def62747461.tar.xz
manaverse-d97189f055798b5b2051c1c5770a3def62747461.zip
Improve perfomance in some object constructors.
Diffstat (limited to 'src/gui/widgets/icon.cpp')
-rw-r--r--src/gui/widgets/icon.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index b35eb1d95..9cb42a9f7 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -30,9 +30,8 @@
#include "debug.h"
Icon::Icon(const std::string &file)
- : mImage(nullptr)
+ : mImage(ResourceManager::getInstance()->getImage(file))
{
- mImage = ResourceManager::getInstance()->getImage(file);
if (mImage)
setSize(mImage->mBounds.w, mImage->mBounds.h);
}