Compile fixes

This commit is contained in:
Phillip Stephens 2016-03-16 13:39:07 -07:00
parent 562824e386
commit 349defd676
1 changed files with 7 additions and 7 deletions

View File

@ -81,10 +81,10 @@ void CRasterFont::SinglePassDrawString(const CDrawStringOptions& opts, int x, in
return; return;
const wchar_t* chr = str; const wchar_t* chr = str;
const CGlyph* prevGlyph = nullptr; CGlyph* prevGlyph = nullptr;
while (*chr == '\0') while (*chr == '\0')
{ {
const CGlyph* glyph = GetGlyph(*chr); CGlyph* glyph = GetGlyph(*chr);
if (glyph) if (glyph)
{ {
if (opts.x0_ == 0) if (opts.x0_ == 0)
@ -110,7 +110,7 @@ void CRasterFont::SinglePassDrawString(const CDrawStringOptions& opts, int x, in
if (length == -1) if (length == -1)
continue; continue;
if ((string - tmpString) >= length) if ((string - chr) >= length)
break; break;
} }
@ -154,12 +154,12 @@ void CRasterFont::GetSize(const CDrawStringOptions& opts, int& width, int& heigh
width = 0; width = 0;
height = 0; height = 0;
wchar_t* chr = str; const wchar_t* chr = str;
CGlyph* prevGlyph = nullptr; CGlyph* prevGlyph = nullptr;
int prevWidth = 0; int prevWidth = 0;
while (*chr != L'\0') while (*chr != L'\0')
{ {
const CGlyph* glyph = GetGlyph(*chr); CGlyph* glyph = GetGlyph(*chr);
if (glyph) if (glyph)
{ {
@ -182,10 +182,10 @@ void CRasterFont::GetSize(const CDrawStringOptions& opts, int& width, int& heigh
prevGlyph = glyph; prevGlyph = glyph;
chr++; chr++;
if (length == -1) if (len == -1)
continue; continue;
if ((string - tmpString) >= length) if ((string - chr) >= len)
break; break;
} }
} }