diff --git a/src/bionics.cpp b/src/bionics.cpp index f0e1783b28dc3..c0e9567ed056e 100644 --- a/src/bionics.cpp +++ b/src/bionics.cpp @@ -2425,7 +2425,7 @@ void Character::add_bionic( const bionic_id &b ) add_bionic( inc_bid ); } - for( const std::pair spell_pair : b->learned_spells ) { + for( const std::pair &spell_pair : b->learned_spells ) { const spell_id learned_spell = spell_pair.first; if( learned_spell->spell_class != trait_id( "NONE" ) ) { const trait_id spell_class = learned_spell->spell_class; @@ -2469,7 +2469,7 @@ void Character::remove_bionic( const bionic_id &b ) continue; } - for( const std::pair &spell_pair : i.id->learned_spells ) { + for( const std::pair &spell_pair : i.id->learned_spells ) { cbm_spells.emplace( spell_pair.first ); } @@ -2477,7 +2477,7 @@ void Character::remove_bionic( const bionic_id &b ) } // any spells you learn from installing a bionic you forget. - for( const std::pair &spell_pair : b->learned_spells ) { + for( const std::pair &spell_pair : b->learned_spells ) { if( cbm_spells.count( spell_pair.first ) == 0 ) { magic.forget_spell( spell_pair.first ); }