From d97189f055798b5b2051c1c5770a3def62747461 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 23 Jul 2012 00:10:43 +0300 Subject: Improve perfomance in some object constructors. --- src/gui/widgets/icon.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gui/widgets/icon.cpp') 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); } -- cgit v1.2.3-60-g2f50