Fix warning -Wchar-subscripts

This commit is contained in:
Emil Laine 2016-04-24 01:33:27 +03:00 committed by Daniel Gibson
parent 13ba79ea5f
commit 16a2048a2c
2 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ void CFontData::Read_t( CTStream *inFile) // throw char *
SetCharSpacing(+1); SetCharSpacing(+1);
SetLineSpacing(+1); SetLineSpacing(+1);
SetSpaceWidth(0.5f); SetSpaceWidth(0.5f);
fd_fcdFontCharData[' '].fcd_pixStart = 0; fd_fcdFontCharData[(int)' '].fcd_pixStart = 0;
} }
void CFontData::Write_t( CTStream *outFile) // throw char * void CFontData::Write_t( CTStream *outFile) // throw char *
@ -201,7 +201,7 @@ void CFontData::Make_t( const CTFileName &fnTexture, PIX pixCharWidth, PIX pixCh
iLetter++; // skip carriage return iLetter++; // skip carriage return
} }
// set default space width // set default space width
fd_fcdFontCharData[' '].fcd_pixStart = 0; fd_fcdFontCharData[(int)' '].fcd_pixStart = 0;
SetSpaceWidth(0.5f); SetSpaceWidth(0.5f);
// all done // all done

View File

@ -71,7 +71,7 @@ public:
inline void SetFixedWidth(void) { fd_bFixedWidth = TRUE; }; inline void SetFixedWidth(void) { fd_bFixedWidth = TRUE; };
inline void SetVariableWidth(void) { fd_bFixedWidth = FALSE; }; inline void SetVariableWidth(void) { fd_bFixedWidth = FALSE; };
inline void SetSpaceWidth( FLOAT fWidthRatio) { // relative to char cell width (1/2 is default) inline void SetSpaceWidth( FLOAT fWidthRatio) { // relative to char cell width (1/2 is default)
fd_fcdFontCharData[' '].fcd_pixEnd = (PIX)(fd_pixCharWidth*fWidthRatio); } fd_fcdFontCharData[(int)' '].fcd_pixEnd = (PIX)(fd_pixCharWidth*fWidthRatio); }
void Read_t( CTStream *inFile); // throw char * void Read_t( CTStream *inFile); // throw char *
void Write_t( CTStream *outFile); // throw char * void Write_t( CTStream *outFile); // throw char *