summaryrefslogtreecommitdiff
path: root/src/resources/theme.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-22 17:47:52 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-08-04 21:24:44 +0200
commitf94d3280c2f2520a80e9099e0dd4d6d9491e18a5 (patch)
treebd546ac39f2f2739b8d10ed6ac9385534d38b256 /src/resources/theme.cpp
parent3d1aa110349c2f74bfd10451edba10e2a4d485d6 (diff)
downloadmana-f94d3280c2f2520a80e9099e0dd4d6d9491e18a5.tar.gz
mana-f94d3280c2f2520a80e9099e0dd4d6d9491e18a5.tar.bz2
mana-f94d3280c2f2520a80e9099e0dd4d6d9491e18a5.tar.xz
mana-f94d3280c2f2520a80e9099e0dd4d6d9491e18a5.zip
Removed unused Skin::mName and Skin::mFilePath
Diffstat (limited to 'src/resources/theme.cpp')
-rw-r--r--src/resources/theme.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/resources/theme.cpp b/src/resources/theme.cpp
index 67cd6650..9a8ac7a7 100644
--- a/src/resources/theme.cpp
+++ b/src/resources/theme.cpp
@@ -53,12 +53,7 @@ static void initDefaultThemePath()
defaultThemePath = "graphics/gui/";
}
-Skin::Skin(ImageRect skin, Image *close, Image *stickyUp, Image *stickyDown,
- const std::string &filePath,
- const std::string &name):
- instances(0),
- mFilePath(filePath),
- mName(name),
+Skin::Skin(ImageRect skin, Image *close, Image *stickyUp, Image *stickyDown):
mBorder(skin),
mCloseImage(close),
mStickyImageUp(stickyUp),
@@ -157,10 +152,11 @@ Skin *Theme::load(const std::string &filename, const std::string &defaultPath)
{
// Check if this skin was already loaded
auto skinIterator = mSkins.find(filename);
- if (mSkins.end() != skinIterator)
+ if (skinIterator != mSkins.end())
{
- skinIterator->second->instances++;
- return skinIterator->second;
+ Skin *skin = skinIterator->second;
+ skin->instances++;
+ return skin;
}
Skin *skin = readSkin(filename);
@@ -316,8 +312,7 @@ Skin *Theme::readSkin(const std::string &filename)
Image *stickyImageDown = sticky->getSubImage(15, 0, 15, 15);
sticky->decRef();
- Skin *skin = new Skin(border, closeImage, stickyImageUp, stickyImageDown,
- filename);
+ Skin *skin = new Skin(border, closeImage, stickyImageUp, stickyImageDown);
skin->updateAlpha(mMinimumOpacity);
return skin;
}