Quellcode durchsuchen

Animation Editor: Creating Motion Sets does not increment them correctly (#4368)

Signed-off-by: Benjamin Jillich <[email protected]>
Benjamin Jillich vor 4 Jahren
Ursprung
Commit
acea5b7da8
1 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen
  1. 5 3
      Gems/EMotionFX/Code/EMotionFX/Source/MotionSet.cpp

+ 5 - 3
Gems/EMotionFX/Code/EMotionFX/Source/MotionSet.cpp

@@ -726,10 +726,12 @@ namespace EMotionFX
     {
         MCore::LockGuardRecursive lock(m_mutex);
 
-        return AZStd::accumulate(begin(m_childSets), end(m_childSets), size_t{0}, [](size_t total, const MotionSet* motionSet)
+        size_t result = 0;
+        for (const MotionSet* motionSet : m_childSets)
         {
-            return total + motionSet->GetIsOwnedByRuntime();
-        });
+            result += !motionSet->GetIsOwnedByRuntime();
+        }
+        return result;
     }