Explorar o código

Fix gcc warnings. (initialization order)

Denis Biryukov %!s(int64=11) %!d(string=hai) anos
pai
achega
ab6b5a7b21
Modificáronse 2 ficheiros con 11 adicións e 9 borrados
  1. 6 5
      code/FBXBinaryTokenizer.cpp
  2. 5 4
      code/FBXTokenizer.cpp

+ 6 - 5
code/FBXBinaryTokenizer.cpp

@@ -55,14 +55,15 @@ namespace FBX {
 
 // ------------------------------------------------------------------------------------------------
 Token::Token(const char* sbegin, const char* send, TokenType type, unsigned int offset)
-	: sbegin(sbegin)
+	: 
+	#ifdef DEBUG
+	contents(sbegin, static_cast<size_t>(send-sbegin)),
+	#endif
+	sbegin(sbegin)
 	, send(send)
 	, type(type)
 	, line(offset)
 	, column(BINARY_MARKER)
-#ifdef DEBUG
-	, contents(sbegin, static_cast<size_t>(send-sbegin))
-#endif
 {
 	ai_assert(sbegin);
 	ai_assert(send);
@@ -395,4 +396,4 @@ void TokenizeBinary(TokenList& output_tokens, const char* input, unsigned int le
 } // !FBX
 } // !Assimp
 
-#endif
+#endif

+ 5 - 4
code/FBXTokenizer.cpp

@@ -58,14 +58,15 @@ namespace FBX {
 
 // ------------------------------------------------------------------------------------------------
 Token::Token(const char* sbegin, const char* send, TokenType type, unsigned int line, unsigned int column)
-	: sbegin(sbegin)
+	:
+#ifdef DEBUG
+	contents(sbegin, static_cast<size_t>(send-sbegin)),
+#endif
+	sbegin(sbegin)
 	, send(send)
 	, type(type)
 	, line(line)
 	, column(column)
-#ifdef DEBUG
-	, contents(sbegin, static_cast<size_t>(send-sbegin))
-#endif
 {
 	ai_assert(sbegin);
 	ai_assert(send);