summaryrefslogtreecommitdiff
path: root/src/gui/palette.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-29 20:01:36 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-29 20:02:18 +0200
commit514f4e398a6d2d40327ffc72b127fc6ee7a38526 (patch)
treed15f55472ff9d6f7a108cb08883e044d2446f4d1 /src/gui/palette.cpp
parent377880eca6d9d0cace2c43a12a131b67661192d3 (diff)
downloadmana-514f4e398a6d2d40327ffc72b127fc6ee7a38526.tar.gz
mana-514f4e398a6d2d40327ffc72b127fc6ee7a38526.tar.bz2
mana-514f4e398a6d2d40327ffc72b127fc6ee7a38526.tar.xz
mana-514f4e398a6d2d40327ffc72b127fc6ee7a38526.zip
Made sure the right overloads are used
Diffstat (limited to 'src/gui/palette.cpp')
-rw-r--r--src/gui/palette.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp
index 855487d3..f46eeb92 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -155,7 +155,7 @@ Palette::~Palette()
{
char buffer[20];
sprintf(buffer, "0x%06x", col->getRGB());
- config.setValue(*configName, buffer);
+ config.setValue(*configName, std::string(buffer));
}
}
}
@@ -271,7 +271,8 @@ void Palette::addColor(Palette::ColorType type, int rgb,
const std::string *configName = &ColorTypeNames[type];
char buffer[20];
sprintf(buffer, "0x%06x", rgb);
- const std::string rgbString = config.getValue(*configName, buffer);
+ const std::string rgbString = config.getValue(*configName,
+ std::string(buffer));
unsigned int rgbValue = 0;
if (rgbString.length() == 8 && rgbString[0] == '0' && rgbString[1] == 'x')
rgbValue = atox(rgbString);