Skip to content

Commit

Permalink
xrParticles: Fixed MSVC W3-level warnings (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Apr 30, 2023
1 parent fadcf4f commit d51d49d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/xrParticles/particle_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@ int CParticleManager::CreateEffect(u32 max_particles)
ScopeLock lock{ &pm_lock };
int eff_id = -1;
for (int i = 0; i < (int)effect_vec.size(); i++)
{
if (!effect_vec[i])
{
eff_id = i;
break;
}
}

if (eff_id < 0)
{
// Couldn't find a big enough gap. Reallocate.
eff_id = effect_vec.size();
eff_id = (int)effect_vec.size();
effect_vec.push_back(nullptr);
}

Expand Down Expand Up @@ -72,7 +74,7 @@ int CParticleManager::CreateActionList()
if (list_id < 0)
{
// Couldn't find a big enough gap. Reallocate.
list_id = m_alist_vec.size();
list_id = (int)m_alist_vec.size();
m_alist_vec.push_back(nullptr);
}

Expand Down Expand Up @@ -333,7 +335,7 @@ void CParticleManager::SaveActions(int alist_id, IWriter& W)
ParticleActions* pa = GetActionListPtr(alist_id);
VERIFY(pa);
pa->lock();
W.w_u32(pa->size());
W.w_u32(static_cast<u32>(pa->size()));
for (auto& it : *pa)
it->Save(W);
pa->unlock();
Expand Down

0 comments on commit d51d49d

Please sign in to comment.