CHEWY: Pass the text parameter of getLine() by reference

Saves an unneeded copy
This commit is contained in:
Filippos Karapetis 2016-10-09 23:33:19 +03:00
parent 8df9eb5b8f
commit 339e1c1f88
2 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ Font::~Font() {
_fontSurface.free();
}
::Graphics::Surface *Font::getLine(const Common::String text) {
::Graphics::Surface *Font::getLine(const Common::String &text) {
::Graphics::Surface *line = new ::Graphics::Surface();
line->create(text.size() * _width, _height, ::Graphics::PixelFormat::createFormatCLUT8());

View File

@ -100,7 +100,7 @@ public:
Font(Common::String filename);
virtual ~Font();
::Graphics::Surface *getLine(const Common::String text);
::Graphics::Surface *getLine(const Common::String &text);
private:
uint16 _count, _first, _last, _width, _height;