Fix windows build
This commit is contained in:
@@ -403,7 +403,7 @@ CubicSplineN* ActorMultiVertex::GetSpline(size_t i)
|
||||
|
||||
void ActorMultiVertex::SetState(int i)
|
||||
{
|
||||
ASSERT(i >= 0 and static_cast<size_t>(i) < _states.size());
|
||||
ASSERT(i >= 0 && static_cast<size_t>(i) < _states.size());
|
||||
_cur_state= i;
|
||||
_secs_into_state= 0.0f;
|
||||
}
|
||||
|
||||
+2
-2
@@ -192,8 +192,8 @@ namespace Endian
|
||||
inline constexpr bool little = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__;
|
||||
inline constexpr bool big = __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__;
|
||||
#elif defined(_WIN32)
|
||||
inline constexpr bool little = false;
|
||||
inline constexpr bool big = true;
|
||||
inline constexpr bool little = true;
|
||||
inline constexpr bool big = false;
|
||||
#else
|
||||
#error "unknown byte order"
|
||||
#endif
|
||||
|
||||
@@ -347,7 +347,7 @@ void TextureFont::FormatFontPage( int iPage, HDC hDC )
|
||||
}
|
||||
|
||||
/* UTF-8 encode ch and append to out. */
|
||||
void wchar_to_utf8( wchar_t ch, string &out )
|
||||
void wchar_to_utf8( wchar_t ch, std::string &out )
|
||||
{
|
||||
if( ch < 0x80 ) { out.append( 1, (char) ch ); return; }
|
||||
|
||||
@@ -385,7 +385,7 @@ void TextureFont::Save( CString sBasePath, CString sBitmapAppendBeforeExtension,
|
||||
|
||||
const CString inipath = sBasePath + ".ini";
|
||||
|
||||
ofstream f;
|
||||
std::ofstream f;
|
||||
|
||||
if( bSaveMetrics )
|
||||
{
|
||||
@@ -421,12 +421,12 @@ void TextureFont::Save( CString sBasePath, CString sBitmapAppendBeforeExtension,
|
||||
unsigned iLine = 0;
|
||||
while( iChar < desc.chars.size() )
|
||||
{
|
||||
f << "Line " << setw(iWidth) << iLine << "=";
|
||||
f << setw(1);
|
||||
f << "Line " << std::setw(iWidth) << iLine << "=";
|
||||
f << std::setw(1);
|
||||
for( int iX = 0; iX < page.m_iNumFramesX && iChar < desc.chars.size(); ++iX, ++iChar )
|
||||
{
|
||||
const wchar_t c = desc.chars[iChar];
|
||||
string sUTF8;
|
||||
std::string sUTF8;
|
||||
wchar_to_utf8( c, sUTF8 );
|
||||
f << sUTF8.c_str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user