Skip to content

Commit

Permalink
clang tidy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GuardianDll committed May 4, 2024
1 parent fdcbcba commit fd0a923
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/crafting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ float Character::workbench_crafting_speed_multiplier( const item &craft,
float Character::crafting_speed_multiplier( const recipe &rec ) const
{

const float limb_score = ( rec.has_flag( flag_NO_MANIP ) ) ? 1.0f : get_limb_score(
const float limb_score = rec.has_flag( flag_NO_MANIP ) ? 1.0f : get_limb_score(
limb_score_manip );
const float pain_multi = ( rec.has_flag( flag_AFFECTED_BY_PAIN ) ) ? std::max( 0.0f,
const float pain_multi = rec.has_flag( flag_AFFECTED_BY_PAIN ) ? std::max( 0.0f,
1.0f - ( get_perceived_pain() / 100.0f ) ) : 1.0f;

float crafting_speed = morale_crafting_speed_multiplier( rec ) *
Expand Down Expand Up @@ -333,9 +333,9 @@ float Character::crafting_speed_multiplier( const item &craft,
const float morale_multi = morale_crafting_speed_multiplier( rec );
const float mut_multi = 1.0 + enchantment_cache->get_value_multiply(
enchant_vals::mod::CRAFTING_SPEED_MULTIPLIER );
const float limb_score = ( rec.has_flag( flag_NO_MANIP ) ) ? 1.0f : get_limb_score(
const float limb_score = rec.has_flag( flag_NO_MANIP ) ? 1.0f : get_limb_score(
limb_score_manip );
const float pain_multi = ( rec.has_flag( flag_AFFECTED_BY_PAIN ) ) ? std::max( 0.0f,
const float pain_multi = rec.has_flag( flag_AFFECTED_BY_PAIN ) ? std::max( 0.0f,
1.0f - ( get_perceived_pain() / 100.0f ) ) : 1.0f ;

const float total_multi = light_multi * bench_multi * morale_multi * mut_multi * limb_score *
Expand Down
4 changes: 2 additions & 2 deletions src/crafting_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2280,9 +2280,9 @@ static void draw_can_craft_indicator( const catacurses::window &w, const recipe
} else if( crafter.crafting_speed_multiplier( rec ) < 1.0f ) {
int morale_modifier = crafter.morale_crafting_speed_multiplier( rec ) * 100;
int lighting_modifier = crafter.lighting_craft_speed_multiplier( rec ) * 100;
int limb_modifier = ( rec.has_flag( flag_NO_MANIP ) ) ? 100 : crafter.get_limb_score(
int limb_modifier = rec.has_flag( flag_NO_MANIP ) ? 100 : crafter.get_limb_score(
limb_score_manip ) * 100;
int pain_multi = ( rec.has_flag( flag_AFFECTED_BY_PAIN ) ) ? 100 * std::max( 0.0f,
int pain_multi = rec.has_flag( flag_AFFECTED_BY_PAIN ) ? 100 * std::max( 0.0f,
1.0f - ( crafter.get_perceived_pain() / 100.0f ) ) : 100;

std::stringstream modifiers_list;
Expand Down

0 comments on commit fd0a923

Please sign in to comment.