From a30c6195d9011b7742e193c53766906d39989b32 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 10 Jul 2020 15:27:53 -0400 Subject: [PATCH] CEditScriptPropertyCommand: Make use of ranged for --- src/Editor/Undo/CEditScriptPropertyCommand.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Editor/Undo/CEditScriptPropertyCommand.h b/src/Editor/Undo/CEditScriptPropertyCommand.h index 76808b6d..69f0a846 100644 --- a/src/Editor/Undo/CEditScriptPropertyCommand.h +++ b/src/Editor/Undo/CEditScriptPropertyCommand.h @@ -21,10 +21,10 @@ public: , mIndex(Index) { // Convert CScriptObject pointers to CInstancePtrs - mInstances.reserve( kInstances.size() ); + mInstances.reserve(kInstances.size()); - for (int i = 0; i < kInstances.size(); i++) - mInstances.push_back( CInstancePtr(kInstances[i]) ); + for (auto* instance : kInstances) + mInstances.push_back(CInstancePtr(instance)); } void GetObjectDataPointers(QVector& OutPointers) const override