Skip to content

Commit

Permalink
Renamed rgb2highlight_pango to something more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Nov 23, 2016
1 parent 4128802 commit d7ef1ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/font/text_formatting.cpp
Expand Up @@ -21,7 +21,7 @@

namespace font {

std::string rgb2highlight_pango(uint32_t rgb)
std::string unit32_to_pango_color(uint32_t rgb)

This comment has been minimized.

Copy link
@CelticMinstrel

CelticMinstrel Nov 25, 2016

Member

Typo :(

{
std::ostringstream h;

Expand Down Expand Up @@ -50,7 +50,7 @@ std::string get_pango_color_from_id(const std::string& id)
{
const auto color = game_config::team_rgb_colors.find(id);
if(color != game_config::team_rgb_colors.end()) {
return rgb2highlight_pango(color->second[0]);
return unit32_to_pango_color(color->second[0]);
}

return "";
Expand Down
2 changes: 1 addition & 1 deletion src/font/text_formatting.hpp
Expand Up @@ -29,7 +29,7 @@ namespace font {
* @param color The 32 byte color to convert to hex format.
* For example, 0x00CC00CC becomes "#CC00CC".
*/
std::string rgb2highlight_pango(uint32_t rgb);
std::string unit32_to_pango_color(uint32_t rgb);

/**
* Returns a hex color string from a SDL_Color object. The '#' prefix is not prepended.
Expand Down
2 changes: 1 addition & 1 deletion src/team.cpp
Expand Up @@ -850,7 +850,7 @@ std::string team::get_side_color_index(int side)

std::string team::get_side_highlight_pango(int side)
{
return font::rgb2highlight_pango(get_side_color_range(side+1).mid());
return font::unit32_to_pango_color(get_side_color_range(side+1).mid());
}

void team::log_recruitable() const {
Expand Down

0 comments on commit d7ef1ed

Please sign in to comment.