Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup some random clang-tidy errors. #54374

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ static constexpr int DANGEROUS_PROXIMITY = 5;


#if defined(__ANDROID__)
extern bool add_key_to_quick_shortcuts( int key, const std::string &category, bool back );
extern bool add_key_to_quick_shortcuts( int key, const std::string &category, bool back ); // NOLINT
#endif

//The one and only game instance
Expand Down Expand Up @@ -547,8 +547,8 @@ void game::load_data_from_dir( const std::string &path, const std::string &src,

#if !(defined(_WIN32) || defined(TILES))
// in ncurses_def.cpp
void check_encoding();
void ensure_term_size();
extern void check_encoding(); // NOLINT
extern void ensure_term_size(); // NOLINT
#endif

void game_ui::init_ui()
Expand Down
6 changes: 0 additions & 6 deletions src/game_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,24 @@

void reinitialize_framebuffer()
{
return;
}

void to_map_font_dim_width( int & )
{
return;
}

void to_map_font_dim_height( int & )
{
return;
}

void to_map_font_dimension( int &, int & )
{
return;
}
void from_map_font_dimension( int &, int & )
{
return;
}
void to_overmap_font_dimension( int &, int & )
{
return;
}

#endif
2 changes: 1 addition & 1 deletion src/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class input_manager
* Use `input_context::(re)set_timeout()` when possible so timeout will be properly
* reset when entering a new input context.
*/
void set_timeout( int t );
void set_timeout( int delay );
void reset_timeout() {
set_timeout( -1 );
}
Expand Down
5 changes: 3 additions & 2 deletions src/ncurses_def.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ bool nc_color::is_blink() const
return attribute_value & A_BLINK;
}

void ensure_term_size();
void check_encoding();
void ensure_term_size(); // NOLINT(cata-static-declarations)
void check_encoding(); // NOLINT(cata-static-declarations)

void ensure_term_size()
{
Expand Down Expand Up @@ -461,6 +461,7 @@ void ensure_term_size()
}
}

// NOLINTNEXTLINE(cata-static-declarations)
void check_encoding()
{
// Check whether LC_CTYPE supports the UTF-8 encoding
Expand Down
2 changes: 1 addition & 1 deletion src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ bool options_manager::cOpt::checkPrerequisite() const
bool options_manager::cOpt::is_hidden() const
{
switch( hide ) {
case COPT_NO_HIDE:
case COPT_NO_HIDE: // NOLINT(bugprone-branch-clone)
return false;

case COPT_SDL_HIDE:
Expand Down
2 changes: 1 addition & 1 deletion tests/widget_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace cata_curses_test
#endif
#include <curses.h>
#endif
}
} // namespace cata_curses_test
#else
#include "cursesport.h"
#endif
Expand Down