Gvas: improve a loop to avoid a useless move.

This commit is contained in:
Guillaume Jacquemin 2024-03-08 21:20:11 +01:00
parent 3c79f39046
commit f68dee939e
Signed by: williamjcm
SSH key fingerprint: SHA256:AYLOg+iTV0ElElnlu4vqM4edFazVdRiuQB0Y5LoKc4A

View file

@ -227,9 +227,7 @@ File::loadData() {
_customFormatData = Containers::Array<CustomFormatDataEntry>{custom_format_data_size}; _customFormatData = Containers::Array<CustomFormatDataEntry>{custom_format_data_size};
for(std::uint32_t i = 0; i < custom_format_data_size; i++) { for(auto& entry : _customFormatData) {
CustomFormatDataEntry entry;
if(!reader.readStaticArray(entry.id) || if(!reader.readStaticArray(entry.id) ||
!reader.readInt32(entry.value)) !reader.readInt32(entry.value))
{ {
@ -237,8 +235,6 @@ File::loadData() {
LOG_ERROR(_lastError); LOG_ERROR(_lastError);
return; return;
} }
_customFormatData[i] = std::move(entry);
} }
if(!reader.readUEString(_saveType)) { if(!reader.readUEString(_saveType)) {