From f68dee939e198386990c858fe6c6a79d676b2d92 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquemin Date: Fri, 8 Mar 2024 21:20:11 +0100 Subject: [PATCH] Gvas: improve a loop to avoid a useless move. --- src/Gvas/File.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Gvas/File.cpp b/src/Gvas/File.cpp index 1146d8b..a4fb2b1 100644 --- a/src/Gvas/File.cpp +++ b/src/Gvas/File.cpp @@ -227,9 +227,7 @@ File::loadData() { _customFormatData = Containers::Array{custom_format_data_size}; - for(std::uint32_t i = 0; i < custom_format_data_size; i++) { - CustomFormatDataEntry entry; - + for(auto& entry : _customFormatData) { if(!reader.readStaticArray(entry.id) || !reader.readInt32(entry.value)) { @@ -237,8 +235,6 @@ File::loadData() { LOG_ERROR(_lastError); return; } - - _customFormatData[i] = std::move(entry); } if(!reader.readUEString(_saveType)) {