From ef605fecaa4c51f3b59f5d1038a9f7ddd2417967 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 12 May 2018 08:09:27 +0200 Subject: [PATCH] FBX: small optimization to avoind static computation in loop. --- code/FBXBinaryTokenizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/FBXBinaryTokenizer.cpp b/code/FBXBinaryTokenizer.cpp index d6c34de6f..b81a9f945 100644 --- a/code/FBXBinaryTokenizer.cpp +++ b/code/FBXBinaryTokenizer.cpp @@ -448,8 +448,8 @@ void TokenizeBinary(TokenList& output_tokens, const char* input, unsigned int le /*Result ignored*/ ReadByte(input, cursor, input + length); const uint32_t version = ReadWord(input, cursor, input + length); const bool is64bits = version >= 7500; - while (cursor < input + length) - { + const char *end = input + length; + while (cursor < end ) { if (!ReadScope(output_tokens, input, cursor, input + length, is64bits)) { break; }