diff --git a/src/map/label.cpp b/src/map/label.cpp index a70d2a23f465..e4cde9d4a6be 100644 --- a/src/map/label.cpp +++ b/src/map/label.cpp @@ -409,7 +409,7 @@ void terrain_label::write(config& cfg) const cfg["text"] = text(); cfg["tooltip"] = tooltip(); cfg["team_name"] = (this->team_name()); - cfg["color"] = cfg_color(); + cfg["color"] = color_.to_rgb_string(); cfg["visible_in_fog"] = visible_in_fog_; cfg["visible_in_shroud"] = visible_in_shroud_; cfg["immutable"] = immutable_; @@ -467,17 +467,6 @@ const color_t& terrain_label::color() const return color_; } -std::string terrain_label::cfg_color() const -{ - std::stringstream buf; - const unsigned int red = static_cast(color_.r); - const unsigned int green = static_cast(color_.g); - const unsigned int blue = static_cast(color_.b); - const unsigned int alpha = static_cast(color_.a); - buf << red << "," << green << "," << blue << "," << alpha; - return buf.str(); -} - void terrain_label::set_text(const t_string& text) { text_ = text; diff --git a/src/map/label.hpp b/src/map/label.hpp index 27f2204dfb9a..9d6d061ef255 100644 --- a/src/map/label.hpp +++ b/src/map/label.hpp @@ -165,7 +165,6 @@ class terrain_label void draw(); bool hidden() const; bool viewable(const display_context & dc) const; - std::string cfg_color() const; int handle_; int tooltip_handle_;