Skip to content

Commit

Permalink
xrParticles: refactor of size type
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Nov 28, 2018
1 parent 155f44b commit d4895db
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/xrParticles/particle_actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ParticleActions
bool empty() const { return actions.empty(); }
PAVecIt begin() { return actions.begin(); }
PAVecIt end() { return actions.end(); }
int size() const { return actions.size(); }
size_t size() const { return actions.size(); }

void resize(int cnt)
{
Expand Down
2 changes: 1 addition & 1 deletion src/xrParticles/particle_actions_collection_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace PAPI;
void ParticleAction::Load(IReader& F)
{
m_Flags.assign(F.r_u32());
type = (PActionEnum)F.r_u32();
type = PActionEnum(F.r_u32());
}

void ParticleAction::Save(IWriter& F)
Expand Down
4 changes: 2 additions & 2 deletions src/xrParticles/particle_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ ParticleAction* CParticleManager::CreateAction(PActionEnum type)
return pa;
}

u32 CParticleManager::LoadActions(int alist_id, IReader& R)
size_t CParticleManager::LoadActions(int alist_id, IReader& R)
{
// Execute the specified action list.
ParticleActions* pa = GetActionListPtr(alist_id);
Expand All @@ -313,7 +313,7 @@ u32 CParticleManager::LoadActions(int alist_id, IReader& R)
u32 cnt = R.r_u32();
for (u32 k = 0; k < cnt; k++)
{
ParticleAction* act = CreateAction((PActionEnum)R.r_u32());
ParticleAction* act = CreateAction(PActionEnum(R.r_u32()));
act->Load(R);
pa->append(act);
}
Expand Down
2 changes: 1 addition & 1 deletion src/xrParticles/particle_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CParticleManager : public IParticleManager

// action
ParticleAction* CreateAction(PActionEnum action_id) override;
u32 LoadActions(int alist_id, IReader& R) override;
size_t LoadActions(int alist_id, IReader& R) override;
void SaveActions(int alist_id, IWriter& W) override;
};
} // namespace PAPI
2 changes: 1 addition & 1 deletion src/xrParticles/psystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class IParticleManager

// action
virtual ParticleAction* CreateAction(PActionEnum type) = 0;
virtual u32 LoadActions(int alist_id, IReader& R) = 0;
virtual size_t LoadActions(int alist_id, IReader& R) = 0;
virtual void SaveActions(int alist_id, IWriter& W) = 0;
};

Expand Down

0 comments on commit d4895db

Please sign in to comment.