aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/XPM.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/XPM.cxx')
-rw-r--r--src/XPM.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/XPM.cxx b/src/XPM.cxx
index cfe6d94af..c310911f6 100644
--- a/src/XPM.cxx
+++ b/src/XPM.cxx
@@ -297,13 +297,8 @@ void RGBAImageSet::Clear() noexcept {
}
/// Add an image.
-void RGBAImageSet::Add(int ident, RGBAImage *image) {
- ImageMap::iterator it=images.find(ident);
- if (it == images.end()) {
- images[ident] = std::unique_ptr<RGBAImage>(image);
- } else {
- it->second.reset(image);
- }
+void RGBAImageSet::AddImage(int ident, std::unique_ptr<RGBAImage> image) {
+ images[ident] = std::move(image);
height = -1;
width = -1;
}