From a8e7c2360508060234aca824d65b692a3d303624 Mon Sep 17 00:00:00 2001 From: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> Date: Sat, 29 Apr 2023 00:29:33 +0800 Subject: [PATCH] Fix warning related to unreachable-code. Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> --- code/AssetLib/FBX/FBXParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/AssetLib/FBX/FBXParser.cpp b/code/AssetLib/FBX/FBXParser.cpp index 150921db5..11cd1a934 100644 --- a/code/AssetLib/FBX/FBXParser.cpp +++ b/code/AssetLib/FBX/FBXParser.cpp @@ -190,7 +190,7 @@ Scope::Scope(Parser& parser,bool topLevel) } auto *element = new_Element(*n, parser); - + // Element() should stop at the next Key token (or right after a Close token) n = parser.CurrentToken(); if (n == nullptr) { @@ -198,8 +198,8 @@ Scope::Scope(Parser& parser,bool topLevel) elements.insert(ElementMap::value_type(str, element)); return; } - ParseError("unexpected end of file",parser.LastToken()); delete element; + ParseError("unexpected end of file",parser.LastToken()); } else { elements.insert(ElementMap::value_type(str, element)); }