Skip to content

Commit

Permalink
Merge pull request CleverRaven#32913 from jbytheway/clang_tidy_misc_r…
Browse files Browse the repository at this point in the history
…edundant_expression

clang-tidy misc-redundant-expression
  • Loading branch information
ZhilkinSerg authored Aug 4, 2019
2 parents 0624a07 + a854061 commit 237e975
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ readability-*,\
-cert-msc51-cpp,\
-misc-definitions-in-headers,\
-misc-non-private-member-variables-in-classes,\
-misc-redundant-expression,\
-modernize-avoid-c-arrays,\
-modernize-deprecated-headers,\
-modernize-pass-by-value,\
Expand Down
1 change: 1 addition & 0 deletions src/overmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,7 @@ bool overmap::generate_sub( const int z )
ter( p ) = oter_id( "spiral_hub" );
add_mon_group( mongroup( mongroup_id( "GROUP_SPIRAL" ), i * 2, j * 2, z, 2, 200 ) );
} else if( oter_above == "silo" ) {
// NOLINTNEXTLINE(misc-redundant-expression)
if( rng( 2, 7 ) < abs( z ) || rng( 2, 7 ) < abs( z ) ) {
ter( p ) = oter_id( "silo_finale" );
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/savegame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ void game::unserialize_master( std::istream &fin )
{
savegame_loading_version = 0;
chkversion( fin );
if( savegame_loading_version != savegame_version && savegame_loading_version < 11 ) {
if( savegame_loading_version < 11 ) {
popup_nowait(
_( "Cannot find loader for save data in old version %d, attempting to load as current version %d." ),
savegame_loading_version, savegame_version );
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle_move.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@ float map::vehicle_wheel_traction( const vehicle &veh ) const
}

for( const auto &terrain_mod : veh.part_info( p ).wheel_terrain_mod() ) {
if( terrain_mod.second.movecost && terrain_mod.second.movecost > 0 &&
if( terrain_mod.second.movecost > 0 &&
tr.has_flag( terrain_mod.first ) ) {
move_mod = terrain_mod.second.movecost;
break;
Expand Down

0 comments on commit 237e975

Please sign in to comment.