Skip to content

Commit

Permalink
Merge pull request #36567 from Fris0uman/ammotext
Browse files Browse the repository at this point in the history
Use empty() method
  • Loading branch information
ZhilkinSerg committed Dec 30, 2019
2 parents 4159f6a + a8597e0 commit 3237ce1
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 3237ce1

Please sign in to comment.