diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-10-25 14:11:28 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-10-25 14:11:51 -0700 |
commit | 0a4e5ec94a1e0468c7a263934bd7f198e089c148 (patch) | |
tree | f3ef86f40749110b4ae1dd5a78cbaf1d511c2e1e /crawl-ref/source/tilefont.cc | |
parent | bbd85319efaf2e9af21a42b5ef6b3d76812457cd (diff) | |
download | crawl-ref-0a4e5ec94a1e0468c7a263934bd7f198e089c148.tar.gz crawl-ref-0a4e5ec94a1e0468c7a263934bd7f198e089c148.zip |
tilefont.{cc,h}: eliminate "array subscript is of type 'char'" warnings
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/tilefont.cc')
-rw-r--r-- | crawl-ref/source/tilefont.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/tilefont.cc b/crawl-ref/source/tilefont.cc index 517279f803..d8cec9c22f 100644 --- a/crawl-ref/source/tilefont.cc +++ b/crawl-ref/source/tilefont.cc @@ -478,7 +478,7 @@ unsigned int FTFont::string_width(const char *text) unsigned int width = base_width; unsigned int adjust = 0; - for (const char *itr = text; *itr; itr++) + for (const unsigned char *itr = (unsigned const char *)text; *itr; itr++) { if (*itr == '\n') { @@ -503,7 +503,7 @@ int FTFont::find_index_before_width(const char *text, int max_width) for (int i = 0; text[i]; i++) { - char c = text[i]; + unsigned char c = text[i]; width += m_glyphs[c].advance; int adjust = std::max(0, m_glyphs[c].width - m_glyphs[c].advance); if (width + adjust > max_width) @@ -705,7 +705,7 @@ void FTFont::store(FontBuffer &buf, float &x, float &y, } void FTFont::store(FontBuffer &buf, float &x, float &y, - char c, const VColour &col) + unsigned char c, const VColour &col) { if (!m_glyphs[c].renderable) { |