Skip to content

Commit

Permalink
Use empty() method
Browse files Browse the repository at this point in the history
  • Loading branch information
Fris0uman committed Dec 30, 2019
1 parent 5b3dcd7 commit a8597e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4037,7 +4037,7 @@ std::string item::display_name( unsigned int quantity ) const
if( is_money() ) {
amt = string_format( " $%.2f", amount / 100.0 );
} else {
if( ammotext != "" ) {
if( !ammotext.empty() ) {
ammotext = " " + ammotext;
}

Expand All @@ -4047,7 +4047,7 @@ std::string item::display_name( unsigned int quantity ) const
amt = string_format( " (%i%s)", amount, ammotext );
}
}
} else if( ammotext != "" ) {
} else if( !ammotext.empty() ) {
amt = " (" + ammotext + ")";
}

Expand Down

0 comments on commit a8597e0

Please sign in to comment.