Skip to content

Commit

Permalink
Merge pull request #39367 from jbytheway/clang_tidy_20200408
Browse files Browse the repository at this point in the history
Misc clang-tidy fixes
  • Loading branch information
ZhilkinSerg authored Apr 8, 2020
2 parents 9b63057 + 8ad705f commit 8396b7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/newcharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1533,10 +1533,11 @@ tab_direction set_profession( avatar &u, points_left &points,
draw_sorting_indicator( w_sorting, ctxt, profession_sorter );

werase( w_genderswap );
//~ Gender switch message. 1s - change key name, 2s - profession name.
std::string g_switch_msg = u.male ?
//~ Gender switch message. 1s - change key name, 2s - profession name.
_( "Press <color_light_green>%1$s</color> to switch "
"to <color_magenta>%2$s</color> (<color_magenta>female</color>)." ) :
//~ Gender switch message. 1s - change key name, 2s - profession name.
_( "Press <color_light_green>%1$s</color> to switch "
"to <color_magenta>%2$s</color> (<color_magenta>male</color>)." );
fold_and_print( w_genderswap, point_zero, ( TERMX / 2 ), c_light_gray, g_switch_msg.c_str(),
Expand Down Expand Up @@ -2444,6 +2445,7 @@ tab_direction set_description( avatar &you, const bool allow_reroll,
ctxt.get_desc( "CHOOSE_LOCATION" ) );
const int prompt_offset = utf8_width( location_prompt );
werase( w_location );
// NOLINTNEXTLINE(cata-use-named-point-constants)
fold_and_print( w_location, point( 0, 1 ), ( TERMX / 2 ), c_light_gray, location_prompt );
mvwprintz( w_location, point( prompt_offset - 10, 0 ), c_light_gray, _( "Starting location:" ) );
// ::find will return empty location if id was not found. Debug msg will be printed too.
Expand Down
4 changes: 4 additions & 0 deletions src/vehicle_move.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,10 @@ veh_collision vehicle::part_collision( int part, const tripoint &p,
} else if( ret.type == veh_coll_body ) {
int dam = obj_dmg * dmg_mod / 100;

// We know critter is set for this type. Assert to inform static
// analysis.
assert( critter );

// No blood from hallucinations
if( !critter->is_hallucination() ) {
if( part_flag( ret.part, "SHARP" ) ) {
Expand Down

0 comments on commit 8396b7c

Please sign in to comment.