clintbellanger/flare — Issue #289: Use const std::string& in FontEngine functions
Author: clintbellanger
Created: 2012-01-25 17:27:42+00:00
State: open

From an anon on OpenGameArt:

Maybe you should check the file FontEngine .*:

- int calc_width(std::string text);
- Point calc_size(std::string text_with_newlines, int width);
- void render(std::string text, int x, int y, int justify, SDL_Surface *target, int color);
- void render(std::string text, int x, int y, int justify, SDL_Surface *target, int width, int color);
- void renderShadowed(std::string text, int x, int y, int justify, SDL_Surface *target, int color);
- void renderShadowed(std::string text, int x, int y, int justify, SDL_Surface *target, int width, int color);

To const ref:

+ int calc_width(const std::string& text);
+ Point calc_size(const std::string& text_with_newlines, int width);
+ void render(const std::string& text, int x, int y, int justify, SDL_Surface *target, int color);
+ void render(const std::string& text, int x, int y, int justify, SDL_Surface *target, int width, int color);
+ void renderShadowed(const std::string& text, int x, int y, int justify, SDL_Surface *target, int color);
+ void renderShadowed(const std::string& text, int x, int y, int justify, SDL_Surface *target, int width, int color);