pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/particles particle_cache.cxx,1.2,1.3


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/particles particle_cache.cxx,1.2,1.3 particle_holder.cxx,1.1,1.2
Date: 17 Aug 2002 17:56:27 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/particles
In directory dark:/tmp/cvs-serv28473/particles

Modified Files:
        particle_cache.cxx particle_holder.cxx 
Log Message:
changed some postfix increments to prefix increments


Index: particle_cache.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/particles/particle_cache.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- particle_cache.cxx  13 Jun 2002 14:25:13 -0000      1.2
+++ particle_cache.cxx  17 Aug 2002 17:56:24 -0000      1.3
@@ -39,7 +39,7 @@
     {
       std::vector<Particle*>::iterator particle = position;
       
-      position++;
+      ++position;
       return *particle;
     }
   else 
@@ -48,7 +48,7 @@
       
       std::cout << "Out of particles" << std::endl;
       particles.push_back(new PinguParticle());
-      position++;
+      ++position;
 
       return *particle;
     }
@@ -57,7 +57,7 @@
 void
 ParticleCache::allocate(int num_objs)
 {
-  for(int i=0; i < num_objs; i++)
+  for(int i=0; i < num_objs; ++i)
     {
       particles.push_back(new PinguParticle());
     }
@@ -66,7 +66,7 @@
 void
 ParticleCache::clear()
 {
-  for(std::vector<Particle*>::iterator i = particles.begin(); i != 
particles.end(); i++)
+  for(std::vector<Particle*>::iterator i = particles.begin(); i != 
particles.end(); ++i)
     {
       delete (*i);
     }  

Index: particle_holder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/particles/particle_holder.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- particle_holder.cxx 12 Jun 2002 19:11:31 -0000      1.1
+++ particle_holder.cxx 17 Aug 2002 17:56:24 -0000      1.2
@@ -36,7 +36,7 @@
 void
 ParticleHolder::update(float delta)
 {
-  for(std::list<Particle*>::iterator i = this->begin(); i != this->end(); i++) 
+  for(std::list<Particle*>::iterator i = this->begin(); i != this->end(); ++i) 
     {
       if ((*i)->is_alive()) 
        {
@@ -53,7 +53,7 @@
 void
 ParticleHolder::draw_offset(int x, int y, float s) // const
 {
-  for(std::list<Particle*>::iterator i = this->begin(); i != this->end(); i++) 
+  for(std::list<Particle*>::iterator i = this->begin(); i != this->end(); ++i) 
     { 
       (*i)->draw_offset(x, y, s);
     }
@@ -62,7 +62,7 @@
 void
 ParticleHolder::add_pingu_explo(int x, int y)
 {
-  for(int i=0; i < 50; i++) 
+  for(int i=0; i < 50; ++i) 
     {
       add_pingu_particle(x, y, frand()*7 - 3.5, frand()* -7.0);
     }
@@ -96,7 +96,7 @@
 ParticleHolder::clear_particles()
 {
   std::cout << "ParticleHolder:: Clearing particles" << std::endl;
-  for(std::vector<Particle*>::iterator i = all_particles.begin(); i != 
all_particles.end(); i++)
+  for(std::vector<Particle*>::iterator i = all_particles.begin(); i != 
all_particles.end(); ++i)
     {
       delete (*i);
     }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]