ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.73k stars 376 forks source link

Use showStandardTextMessage() instead of showMessage() where possible and reduce string copying by using std::move() #8955

Closed Districh-ru closed 4 months ago

Districh-ru commented 4 months ago

This PR replaces the usage of showMessage() by showStandardTextMessage() where fheroes2::Text is used. Also in such updated places std::move() is now mostly used to prevent sting copying.

This PR affects most pop-up messages. The most changes are done to the hero's actions dialogs.

ihhub commented 4 months ago

@Districh-ru , many thanks for these optimizations!