diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 16:09:47 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 16:09:47 +0200 |
commit | 277157b3e06b2deeacbdbc8bf6190de19f88169d (patch) | |
tree | db9c013b67f93d27fa5bb9cf84c7d6dc53f72734 /TileColorFactory.h | |
parent | 64028952ceb17f97ded08f1ab7ec0b06c41e2b87 (diff) |
more refactoring / preparation for pathfinding
Diffstat (limited to 'TileColorFactory.h')
-rw-r--r-- | TileColorFactory.h | 10 |
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, |