1
0

Fixed xofts issues

This commit is contained in:
Tycho 2014-03-14 06:11:49 -07:00
parent 692cf5bb70
commit cd6ab5617c
10 changed files with 24 additions and 23 deletions

View File

@ -767,7 +767,7 @@ bool cByteBuffer::ReadUTF16String(AString & a_String, int a_NumChars)
{
return false;
}
RawBEToUTF8((RawData.data()), a_NumChars, a_String);
RawBEToUTF8(RawData.data(), a_NumChars, a_String);
return true;
}

View File

@ -51,7 +51,7 @@ void cLogCommandOutputCallback::Finished(void)
{
case '\n':
{
LOG("%s",m_Buffer.substr(last, i - last).c_str());
LOG("%s", m_Buffer.substr(last, i - last).c_str());
last = i + 1;
break;
}
@ -59,7 +59,7 @@ void cLogCommandOutputCallback::Finished(void)
} // for i - m_Buffer[]
if (last < len)
{
LOG("%s",m_Buffer.substr(last).c_str());
LOG("%s", m_Buffer.substr(last).c_str());
}
// Clear the buffer for the next command output:

View File

@ -17,7 +17,7 @@ public:
virtual ~cCommandOutputCallback() {}; // Force a virtual destructor in subclasses
/// Syntax sugar function, calls Out() with Printf()-ed parameters; appends a "\n"
void Out(const char * a_Fmt, ...) FORMATSTRING(2,3);
void Out(const char * a_Fmt, ...) FORMATSTRING(2, 3);
/// Called when the command wants to output anything; may be called multiple times
virtual void Out(const AString & a_Text) = 0;

View File

@ -122,9 +122,9 @@ public:
const cPiece & GetPiece (void) const { return *m_Piece; }
const Vector3i & GetCoords (void) const { return m_Coords; }
int GetNumCCWRotations(void) const { return m_NumCCWRotations; }
int GetNumCCWRotations(void) const { return m_NumCCWRotations; }
const cCuboid & GetHitBox (void) const { return m_HitBox; }
int GetDepth (void) const { return m_Depth; }
int GetDepth (void) const { return m_Depth; }
protected:
const cPlacedPiece * m_Parent;

View File

@ -114,7 +114,8 @@ template <typename T, size_t Size, bool x = sizeof(T) == Size>
class SizeChecker;
template <typename T, size_t Size>
class SizeChecker<T, Size, true> {
class SizeChecker<T, Size, true>
{
T v;
};

View File

@ -118,7 +118,7 @@ void cLog::Log(const char * a_Format, va_list argList)
AString Line;
#ifdef _DEBUG
Printf(Line, "[" SIZE_T_FMT_PRECISION(04) "|%02d:%02d:%02d] %s", cIsThread::GetCurrentID(), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
Printf(Line, "[%04lx|%02d:%02d:%02d] %s", cIsThread::GetCurrentID(), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
#else
Printf(Line, "[%02d:%02d:%02d] %s", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
#endif

View File

@ -14,8 +14,8 @@ private:
public:
cLog(const AString & a_FileName);
~cLog();
void Log(const char * a_Format, va_list argList) FORMATSTRING(2,0);
void Log(const char * a_Format, ...) FORMATSTRING(2,3);
void Log(const char * a_Format, va_list argList) FORMATSTRING(2, 0);
void Log(const char * a_Format, ...) FORMATSTRING(2, 3);
// tolua_begin
void SimpleLog(const char * a_String);
void OpenLog(const char * a_FileName);

View File

@ -21,10 +21,10 @@ public: // tolua_export
~cMCLogger(); // tolua_export
void Log(const char* a_Format, va_list a_ArgList) FORMATSTRING(2,0);
void Info(const char* a_Format, va_list a_ArgList) FORMATSTRING(2,0);
void Warn(const char* a_Format, va_list a_ArgList) FORMATSTRING(2,0);
void Error(const char* a_Format, va_list a_ArgList) FORMATSTRING(2,0);
void Log(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
void Info(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
void Warn(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
void Error(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
void LogSimple(const char* a_Text, int a_LogType = 0 ); // tolua_export
@ -57,10 +57,10 @@ private:
extern void LOG(const char* a_Format, ...) FORMATSTRING(1,2);
extern void LOGINFO(const char* a_Format, ...) FORMATSTRING(1,2);
extern void LOGWARN(const char* a_Format, ...) FORMATSTRING(1,2);
extern void LOGERROR(const char* a_Format, ...) FORMATSTRING(1,2);
extern void LOG(const char* a_Format, ...) FORMATSTRING(1, 2);
extern void LOGINFO(const char* a_Format, ...) FORMATSTRING(1, 2);
extern void LOGWARN(const char* a_Format, ...) FORMATSTRING(1, 2);
extern void LOGERROR(const char* a_Format, ...) FORMATSTRING(1, 2);

View File

@ -131,7 +131,7 @@ public:
/** Returns the list of all items in the specified folder (files, folders, nix pipes, whatever's there). */
static AStringVector GetFolderContents(const AString & a_Folder); // Exported in ManualBindings.cpp
int Printf(const char * a_Fmt, ...) FORMATSTRING(2,3);
int Printf(const char * a_Fmt, ...) FORMATSTRING(2, 3);
/** Flushes all the bufferef output into the file (only when writing) */
void Flush(void);

View File

@ -22,16 +22,16 @@ typedef std::list<AString> AStringList;
/** Add the formated string to the existing data in the string */
extern AString & AppendVPrintf(AString & str, const char * format, va_list args) FORMATSTRING(2,0);
extern AString & AppendVPrintf(AString & str, const char * format, va_list args) FORMATSTRING(2, 0);
/// Output the formatted text into the string
extern AString & Printf (AString & str, const char * format, ...) FORMATSTRING(2,3);
extern AString & Printf (AString & str, const char * format, ...) FORMATSTRING(2, 3);
/// Output the formatted text into string, return string by value
extern AString Printf(const char * format, ...) FORMATSTRING(1,2);
extern AString Printf(const char * format, ...) FORMATSTRING(1, 2);
/// Add the formatted string to the existing data in the string
extern AString & AppendPrintf (AString & str, const char * format, ...) FORMATSTRING(2,3);
extern AString & AppendPrintf (AString & str, const char * format, ...) FORMATSTRING(2, 3);
/// Split the string at any of the listed delimiters, return as a stringvector
extern AStringVector StringSplit(const AString & str, const AString & delim);