aboutsummaryrefslogtreecommitdiff
path: root/TileColorFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'TileColorFactory.h')
-rw-r--r--TileColorFactory.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/TileColorFactory.h b/TileColorFactory.h
index 83dfeed..4394c9e 100644
--- a/TileColorFactory.h
+++ b/TileColorFactory.h
@@ -9,15 +9,11 @@ class TileColorFactory {
typedef std::map<std::string, Color> TileAppearanceCollection;
public:
- static Color get_color(std::string);
- static void register_color(std::string, Color);
+ const Color & get_color(const std::string &);
+ void register_color(const std::string &, const Color &);
private:
- static TileAppearanceCollection & get_collection() {
- static TileAppearanceCollection c = {};
- return c;
- }
-
+ TileAppearanceCollection collection;
static constexpr Color default_color = {
.red = 0xff,
.green = 0xff,