Skip to content

Commit

Permalink
Appease our clang overlords
Browse files Browse the repository at this point in the history
  • Loading branch information
Procyonae committed Nov 25, 2024
1 parent c957667 commit 3551848
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,14 @@ std::map<int, inclusive_rectangle<point>> help::draw_menu( const catacurses::win
int second_column = divide_round_up( getmaxx( win ), 2 );
size_t i = 0;
for( const auto &text : help_texts ) {
std::string cat_name = text.second.first.translated();
std::string cat_name;
auto hotkey_it = hotkeys.find( text.first );
if( hotkey_it != hotkeys.end() ) {
cat_name = colorize( hotkey_it->second.short_description(),
selected == text.first ? hilite( c_light_blue ) : c_light_blue ) + ": " + cat_name;
selected == text.first ? hilite( c_light_blue ) : c_light_blue );
cat_name += ": ";
}
cat_name += text.second.first.translated();
const int cat_width = utf8_width( remove_color_tags( cat_name ) );
if( i < half_size ) {
second_column = std::max( second_column, cat_width + 4 );
Expand Down
2 changes: 1 addition & 1 deletion src/help.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class help
static std::string get_dir_grid();
// Modifier for each mods order
int current_order_start = 0;
std::string current_src = "";
std::string current_src;
std::map<int, std::pair<translation, std::vector<translation>>> help_texts;
};

Expand Down

0 comments on commit 3551848

Please sign in to comment.