Skip to content

Commit

Permalink
refactor: fix compiler warnings (#6015)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 authored Jan 30, 2025
1 parent 44f0609 commit da03f06
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8764,7 +8764,6 @@ void Character::on_hit( Creature *source, bodypart_id bp_hit,
bool in_skater_vehicle = in_vehicle && veh_part.part_with_feature( "SEAT_REQUIRES_BALANCE", false );

if( ( worn_with_flag( flag_REQUIRES_BALANCE ) || in_skater_vehicle ) && !is_on_ground() ) {
int rolls = 4;
if( worn_with_flag( flag_ROLLER_ONE ) && !in_skater_vehicle ) {
if( worn_with_flag( flag_REQUIRES_BALANCE ) && !has_effect( effect_downed ) ) {
int rolls = 4;
Expand Down
2 changes: 1 addition & 1 deletion src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8534,7 +8534,7 @@ void game::butcher()
disassembly_stacks_res.emplace_back( stack.first->typeId(), stack.second );
}

for( int i = 0; i < disassembly_stacks_res.size(); i++ ) {
for( int i = 0; i < static_cast<int>( disassembly_stacks_res.size() ); i++ ) {
const auto dis = recipe_dictionary::get_uncraft( disassembly_stacks_res[i].first );
time_to_disassemble_rec += dis.time * disassembly_stacks_res[i].second;
//uses default craft materials to estimate recursive disassembly time
Expand Down
2 changes: 1 addition & 1 deletion src/recipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ std::function<bool( const item & )> recipe::get_component_filter(
};
}

static std::string dump_requirements(
[[maybe_unused]] static std::string dump_requirements(
const requirement_data &reqs,
int move_cost,
const std::map<skill_id, int> &skills )
Expand Down
7 changes: 0 additions & 7 deletions src/vehicle_move.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,13 +656,6 @@ veh_collision vehicle::part_collision( int part, const tripoint &p,
// 0.001 -> 1 meter. Left modifiable so that armor or other parts can affect it.
float deformation_distance = density_factor / 100;

//Calculates mass factor. Depreciated, maintained for stats.
// factor = -25 if mass is much greater than mass2
// factor = +25 if mass2 is much greater than mass
const float weight_factor = mass >= mass2 ?
-25 * ( std::log( mass ) - std::log( mass2 ) ) / std::log( mass ) :
25 * ( std::log( mass2 ) - std::log( mass ) ) / std::log( mass2 );

bool smashed = true;
const std::string snd = _( "smash!" );
float part_dmg = 0;
Expand Down

0 comments on commit da03f06

Please sign in to comment.