mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-03 14:34:34 +00:00
Get rid of a lot of gcc warnings
Mostly signed/unsigned comparisons. Also some bugs, but I don't remember where :D
This commit is contained in:
parent
5ba014640c
commit
b9d402199c
88 changed files with 780 additions and 810 deletions
|
@ -44,10 +44,10 @@ ParticleManager::ParticleManager(int size)
|
|||
setSize(size);
|
||||
}
|
||||
|
||||
void ParticleManager::setSize(int size)
|
||||
void ParticleManager::setSize(size_t size)
|
||||
{
|
||||
// dangerous!
|
||||
for (int i = 0; i < particles.size(); i++)
|
||||
for (size_t i = 0; i < particles.size(); i++)
|
||||
{
|
||||
Particle *p = &particles[i];
|
||||
if (p->emitter)
|
||||
|
@ -71,15 +71,15 @@ void ParticleManager::setNumSuckPositions(int num)
|
|||
suckPositions.resize(num);
|
||||
}
|
||||
|
||||
void ParticleManager::setSuckPosition(int idx, const Vector &pos)
|
||||
void ParticleManager::setSuckPosition(size_t idx, const Vector &pos)
|
||||
{
|
||||
if (idx < 0 || idx >= suckPositions.size()) return;
|
||||
if (idx >= suckPositions.size()) return;
|
||||
suckPositions[idx] = pos;
|
||||
}
|
||||
|
||||
Vector *ParticleManager::getSuckPosition(int idx)
|
||||
Vector *ParticleManager::getSuckPosition(size_t idx)
|
||||
{
|
||||
if (idx < 0 || idx >= suckPositions.size()) return 0;
|
||||
if (idx >= suckPositions.size()) return 0;
|
||||
return &suckPositions[idx];
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,7 @@ void ParticleManager::update(float dt)
|
|||
{
|
||||
BBGE_PROF(ParticleManager_update);
|
||||
numActive = 0;
|
||||
for (int i = 0; i < particles.size(); i++)
|
||||
for (size_t i = 0; i < particles.size(); i++)
|
||||
{
|
||||
if (particles[i].active)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue