aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/draci/font.cpp4
-rw-r--r--engines/draci/font.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/draci/font.cpp b/engines/draci/font.cpp
index 2f51695484..aff674a92f 100644
--- a/engines/draci/font.cpp
+++ b/engines/draci/font.cpp
@@ -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) {
diff --git a/engines/draci/font.h b/engines/draci/font.h
index 55dd495f1e..3e8b120397 100644
--- a/engines/draci/font.h
+++ b/engines/draci/font.h
@@ -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: