From da05d9dd98315378bdded216184294f376643191 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Aug 2015 14:14:34 +0300 Subject: Use resource manager as global variable. --- src/gui/widgets/browserbox.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/gui/widgets/browserbox.cpp') diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index d5eb6b89a..ea6ca7be4 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -121,7 +121,7 @@ BrowserBox::BrowserBox(const Widget2 *const widget, mSkin = theme->load(skin, "browserbox.xml"); if (mInstances == 0) { - mEmotes = ResourceManager::getInstance()->getImageSet( + mEmotes = resourceManager->getImageSet( "graphics/sprites/chatemotes.png", 17, 18); } mInstances ++; @@ -570,8 +570,6 @@ int BrowserBox::calcHeight() Color selColor[2] = {mForegroundColor, mForegroundColor2}; const Color textColor[2] = {mForegroundColor, mForegroundColor2}; - ResourceManager *const resman = ResourceManager::getInstance(); - mLineParts.clear(); FOR_EACH (TextRowCIter, i, mTextRows) @@ -601,7 +599,7 @@ int BrowserBox::calcHeight() const size_t sz = str.size(); if (sz > 2 && str.substr(sz - 1) == "~") str = str.substr(0, sz - 1); - Image *const img = resman->getImage(str); + Image *const img = resourceManager->getImage(str); if (img) { img->incRef(); -- cgit v1.2.3-60-g2f50