diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-03-14 14:11:49 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-03-14 14:11:49 +0100 |
commit | cd6ab5617cd7b26b13cfe26a950ca17fecefd550 (patch) | |
tree | d607161eb1a1c519e519aa1f32ee45dbcc3f587e | |
parent | Merge branch 'master' into warnings (diff) | |
download | cuberite-cd6ab5617cd7b26b13cfe26a950ca17fecefd550.tar cuberite-cd6ab5617cd7b26b13cfe26a950ca17fecefd550.tar.gz cuberite-cd6ab5617cd7b26b13cfe26a950ca17fecefd550.tar.bz2 cuberite-cd6ab5617cd7b26b13cfe26a950ca17fecefd550.tar.lz cuberite-cd6ab5617cd7b26b13cfe26a950ca17fecefd550.tar.xz cuberite-cd6ab5617cd7b26b13cfe26a950ca17fecefd550.tar.zst cuberite-cd6ab5617cd7b26b13cfe26a950ca17fecefd550.zip |
-rw-r--r-- | src/ByteBuffer.cpp | 2 | ||||
-rw-r--r-- | src/CommandOutput.cpp | 4 | ||||
-rw-r--r-- | src/CommandOutput.h | 2 | ||||
-rw-r--r-- | src/Generating/PieceGenerator.h | 4 | ||||
-rw-r--r-- | src/Globals.h | 3 | ||||
-rw-r--r-- | src/Log.cpp | 2 | ||||
-rw-r--r-- | src/Log.h | 4 | ||||
-rw-r--r-- | src/MCLogger.h | 16 | ||||
-rw-r--r-- | src/OSSupport/File.h | 2 | ||||
-rw-r--r-- | src/StringUtils.h | 8 |
10 files changed, 24 insertions, 23 deletions
diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp index d3bcfe866..1893d89a8 100644 --- a/src/ByteBuffer.cpp +++ b/src/ByteBuffer.cpp @@ -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; } diff --git a/src/CommandOutput.cpp b/src/CommandOutput.cpp index 74f857284..2c116b3d6 100644 --- a/src/CommandOutput.cpp +++ b/src/CommandOutput.cpp @@ -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: diff --git a/src/CommandOutput.h b/src/CommandOutput.h index 81d9ddb84..5682b4fd8 100644 --- a/src/CommandOutput.h +++ b/src/CommandOutput.h @@ -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; diff --git a/src/Generating/PieceGenerator.h b/src/Generating/PieceGenerator.h index 3386d7a94..bef9d3463 100644 --- a/src/Generating/PieceGenerator.h +++ b/src/Generating/PieceGenerator.h @@ -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; diff --git a/src/Globals.h b/src/Globals.h index 45d403f27..c2542f0d8 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -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; }; diff --git a/src/Log.cpp b/src/Log.cpp index 395326398..a7be04b1a 100644 --- a/src/Log.cpp +++ b/src/Log.cpp @@ -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 @@ -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); diff --git a/src/MCLogger.h b/src/MCLogger.h index ba9e4827f..996e60329 100644 --- a/src/MCLogger.h +++ b/src/MCLogger.h @@ -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); diff --git a/src/OSSupport/File.h b/src/OSSupport/File.h index e229035b7..b394c5cb9 100644 --- a/src/OSSupport/File.h +++ b/src/OSSupport/File.h @@ -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); diff --git a/src/StringUtils.h b/src/StringUtils.h index 728ce31e6..4feff7553 100644 --- a/src/StringUtils.h +++ b/src/StringUtils.h @@ -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); |