forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove overhead in get_hunger_description()
c229fc4 eliminated most of the cost of this function by deferring the translation of the hunger string, but there is still per frame overhead from alloacting an unnecessary map of std::strings. Making the map values const char* and changing to a std::array lets us make the whole thing static const, and almost constexpr except for the std::string 'values' remaining.
- Loading branch information
1 parent
6ce5e46
commit fc29fb6
Showing
1 changed file
with
20 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters