From 0faf53af0b529afed6f8d3de4a86ac4028a170de Mon Sep 17 00:00:00 2001 From: Richard Date: Fri, 3 Jul 2015 20:13:00 -0600 Subject: [PATCH] Refactor: Prefer Format::operator<< over Format::operator, --- code/FBXUtil.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/code/FBXUtil.cpp b/code/FBXUtil.cpp index 1840e8074..7a7e6b993 100644 --- a/code/FBXUtil.cpp +++ b/code/FBXUtil.cpp @@ -84,29 +84,29 @@ const char* TokenTypeString(TokenType t) // ------------------------------------------------------------------------------------------------ std::string AddOffset(const std::string& prefix, const std::string& text, unsigned int offset) { - return static_cast( (Formatter::format(),prefix," (offset 0x",std::hex,offset,") ",text) ); + return static_cast( (Formatter::format() << prefix << " (offset 0x" << std::hex << offset << ") " << text) ); } // ------------------------------------------------------------------------------------------------ std::string AddLineAndColumn(const std::string& prefix, const std::string& text, unsigned int line, unsigned int column) { - return static_cast( (Formatter::format(),prefix," (line ",line,", col ",column,") ",text) ); + return static_cast( (Formatter::format() << prefix << " (line " << line << " << col " << column << ") " << text) ); } // ------------------------------------------------------------------------------------------------ std::string AddTokenText(const std::string& prefix, const std::string& text, const Token* tok) { if(tok->IsBinary()) { - return static_cast( (Formatter::format(),prefix, - " (",TokenTypeString(tok->Type()), - ", offset 0x", std::hex, tok->Offset(),") ", + return static_cast( (Formatter::format() << prefix << + " (" << TokenTypeString(tok->Type()) << + ", offset 0x" << std::hex << tok->Offset() << ") " << text) ); } - return static_cast( (Formatter::format(),prefix, - " (",TokenTypeString(tok->Type()), - ", line ",tok->Line(), - ", col ",tok->Column(),") ", + return static_cast( (Formatter::format() << prefix << + " (" << TokenTypeString(tok->Type()) << + ", line " << tok->Line() << + ", col " << tok->Column() << ") " << text) ); } @@ -115,4 +115,3 @@ std::string AddTokenText(const std::string& prefix, const std::string& text, con } // !Assimp #endif -