Convert EMotionFX runtime uint32 -> size_t
This allows the EMotionFX runtime to compile with `/we4267` enabled, which emits a warning when converting from `size_t` to a smaller type. All tests for the runtime have been updated accordingly, and they pass. In instances where a range-for loop could be used, or a std algorithm, that was used instead of using `size_t numItems = vec.size()` and a for loop. Casts to `uint32` were removed where possible. Some places remain, like in the file formats. Signed-off-by: Chris Burel <burelc@amazon.com>
This commit is contained in:
@@ -619,8 +619,8 @@ namespace EMotionFX
|
||||
}
|
||||
|
||||
// Process the plugins.
|
||||
const AZ::u32 numPlugins = pluginManager->GetNumActivePlugins();
|
||||
for (AZ::u32 i = 0; i < numPlugins; ++i)
|
||||
const size_t numPlugins = pluginManager->GetNumActivePlugins();
|
||||
for (size_t i = 0; i < numPlugins; ++i)
|
||||
{
|
||||
EMStudio::EMStudioPlugin* plugin = pluginManager->GetActivePlugin(i);
|
||||
plugin->ProcessFrame(delta);
|
||||
@@ -677,8 +677,8 @@ namespace EMotionFX
|
||||
|
||||
const float timeDelta = delta;
|
||||
const ActorManager* actorManager = GetEMotionFX().GetActorManager();
|
||||
const AZ::u32 numActorInstances = actorManager->GetNumActorInstances();
|
||||
for (AZ::u32 i = 0; i < numActorInstances; ++i)
|
||||
const size_t numActorInstances = actorManager->GetNumActorInstances();
|
||||
for (size_t i = 0; i < numActorInstances; ++i)
|
||||
{
|
||||
const ActorInstance* actorInstance = actorManager->GetActorInstance(i);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user