Skip to content

Commit dd9274f

Browse files
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 4b83970 commit dd9274f

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/npctalk.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3502,15 +3502,15 @@ talk_effect_fun_t::func f_add_trait( const JsonObject &jo, std::string_view memb
35023502
for( const std::string &t : existing_types ) {
35033503
bool match = false;
35043504
if constexpr( std::is_same_v<decltype( new_types ), const std::set<std::string> & > ) {
3505-
match = new_types.count( t ) > 0;
3505+
match = new_types.count( t ) > 0;
35063506
} else {
3507-
match = new_types.count( t ) > 0;
3507+
match = new_types.count( t ) > 0;
35083508
}
35093509
if( match ) {
3510-
guy->unset_mutation( existing );
3511-
break;
3512-
}
3513-
}
3510+
guy->unset_mutation( existing );
3511+
break;
3512+
}
3513+
}
35143514

35153515
d.actor( is_npc )->set_mutation( trait, variant );
35163516
};

tests/iuse_test.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,8 @@ TEST_CASE( "water_tablet_purification_test", "[iuse][pur_tablets]" )
10831083
}
10841084
}
10851085

1086-
static void use_item_by_type( avatar &you, const itype_id &id ) {
1086+
static void use_item_by_type( avatar &you, const itype_id &id )
1087+
{
10871088
for( item &it : you.inv_dump() ) {
10881089
if( it.typeId() == id ) {
10891090
you.use( you.get_item_position( &it ) );
@@ -1094,11 +1095,11 @@ static void use_item_by_type( avatar &you, const itype_id &id ) {
10941095

10951096
TEST_CASE( "gracken_strong_arms_trait_change", "[gracken][traits][mutation][item_use]" )
10961097
{
1097-
set_game_mods({ "dda", "Xedra_Evolved" });
1098+
set_game_mods( { "dda", "Xedra_Evolved" } );
10981099

10991100
clear_avatar();
11001101

1101-
const profession *prof = profession::prof("xe_gracken_hunter");
1102+
const profession *prof = profession::prof( "xe_gracken_hunter" );
11021103
REQUIRE( prof != nullptr );
11031104
avatar &you = get_avatar();
11041105
prof->apply( you );

0 commit comments

Comments
 (0)