mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 18:06:26 +00:00
CHEWY: Pass the text parameter of getLine() by reference
Saves an unneeded copy
This commit is contained in:
parent
8df9eb5b8f
commit
339e1c1f88
@ -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());
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user