mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
Added const to reference parameters of Font::drawString() and Font::getStringWidth().
svn-id: r41530
This commit is contained in:
parent
910991ddde
commit
a3a9f5c790
@ -217,7 +217,7 @@ void Font::drawChar(Graphics::Surface *dst, uint8 chr, int tx, int ty) const {
|
||||
* @param spacing Space to leave between individual characters. Defaults to 0.
|
||||
*/
|
||||
|
||||
void Font::drawString(Graphics::Surface *dst, Common::String &str,
|
||||
void Font::drawString(Graphics::Surface *dst, const Common::String &str,
|
||||
int x, int y, int spacing) const {
|
||||
assert(dst != NULL);
|
||||
assert(x >= 0);
|
||||
@ -247,7 +247,7 @@ void Font::drawString(Graphics::Surface *dst, Common::String &str,
|
||||
* @return The calculated width of the string
|
||||
*/
|
||||
|
||||
int Font::getStringWidth(Common::String &str, int spacing) const {
|
||||
int Font::getStringWidth(const Common::String &str, int spacing) const {
|
||||
int width = 0;
|
||||
uint len = str.size();
|
||||
for (unsigned int i = 0; i < len; ++i) {
|
||||
|
@ -50,9 +50,9 @@ public:
|
||||
uint8 getMaxCharWidth() const { return _maxCharWidth; };
|
||||
uint8 getCharWidth(byte chr) const;
|
||||
void drawChar(Graphics::Surface *dst, uint8 chr, int tx, int ty) const;
|
||||
void drawString(Graphics::Surface *dst, Common::String &str,
|
||||
void drawString(Graphics::Surface *dst, const Common::String &str,
|
||||
int x, int y, int spacing = 0) const;
|
||||
int getStringWidth(Common::String &str, int spacing = 0) const;
|
||||
int getStringWidth(const Common::String &str, int spacing = 0) const;
|
||||
void setColour(uint8 colour);
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user