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

Misc clang-tidy fixes #39367

Merged
merged 1 commit into from
Apr 8, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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