Fixed GCC warnings.

This commit is contained in:
bkaradzic
2013-05-15 21:35:26 -07:00
parent 88162a78cc
commit 45e14926d2
2 changed files with 9 additions and 9 deletions

View File

@@ -278,16 +278,16 @@ void TextBuffer::appendText(FontHandle _fontHandle, const char* _string)
m_lineAscender = 0; //font.m_ascender;
}
uint32_t codepoint;
CodePoint_t codepoint = 0;
uint32_t state = 0;
for (; *_string; ++_string)
{
if (!utf8_decode(&state, &codepoint, *_string) )
if (!utf8_decode(&state, (uint32_t*)&codepoint, *_string) )
{
if (m_fontManager->getGlyphInfo(_fontHandle, (CodePoint_t)codepoint, glyph) )
if (m_fontManager->getGlyphInfo(_fontHandle, codepoint, glyph) )
{
appendGlyph( (CodePoint_t)codepoint, font, glyph);
appendGlyph(codepoint, font, glyph);
}
else
{
@@ -296,8 +296,6 @@ void TextBuffer::appendText(FontHandle _fontHandle, const char* _string)
}
}
//printf("U+%04X\n", codepoint);
if (state != UTF8_ACCEPT)
{
// assert(false && "The string is not well-formed");
@@ -558,7 +556,9 @@ void TextBuffer::verticalCenterLastLine(float _dy, float _top, float _bottom)
}
}
TextBufferManager::TextBufferManager(FontManager* _fontManager) : m_fontManager(_fontManager), m_textBufferHandles(MAX_TEXT_BUFFER_COUNT)
TextBufferManager::TextBufferManager(FontManager* _fontManager)
: m_textBufferHandles(MAX_TEXT_BUFFER_COUNT)
, m_fontManager(_fontManager)
{
m_textBuffers = new BufferCache[MAX_TEXT_BUFFER_COUNT];