Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert template arg error fix #18

Open
wants to merge 2 commits into
base: spark2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions include/Core/SPK_Group.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ namespace SPK

bool isEnabled(Param param) const;

size_t getNbParticles() const;
size_t getCapacity() const;
inline unsigned int getNbParticles() const;
inline unsigned int getCapacity() const;

Particle getParticle(size_t index);
const Particle getParticle(size_t index) const;

void reallocate(size_t capacity);
void empty();
void reallocate(unsigned int capacity);
inline void empty();

void addEmitter(const Ref<Emitter>& emitter);
void removeEmitter(const Ref<Emitter>& emitter);
Expand Down Expand Up @@ -401,8 +401,8 @@ namespace SPK
{
bool initialized;

size_t nbParticles;
size_t maxParticles;
unsigned int nbParticles;
unsigned int maxParticles;

// Particles attributes
Vector3D* positions;
Expand Down Expand Up @@ -734,12 +734,12 @@ namespace SPK
return particleData.parameters[param] != NULL;
}

inline size_t Group::getNbParticles() const
inline unsigned int Group::getNbParticles() const
{
return particleData.nbParticles;
}

inline size_t Group::getCapacity() const
inline unsigned int Group::getCapacity() const
{
return particleData.maxParticles;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Core/SPK_Group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace SPK
deathAction(),
octree(NULL)
{
reallocate(capacity);
reallocate(static_cast<unsigned int>(capacity));
}

Group::Group(const Group& group) :
Expand Down Expand Up @@ -270,7 +270,7 @@ namespace SPK
}
}

void Group::reallocate(size_t capacity)
void Group::reallocate(unsigned int capacity)
{
SPK_ASSERT(capacity != 0,"Group::reallocate(size_t) - Group capacity must not be 0");

Expand Down