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