diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-01 16:42:37 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-01 16:42:37 +0200 |
commit | 1373440eb043ebd121a6827aa28e4832cb959efe (patch) | |
tree | 20538d24b1613082334e928b08efc5bf491293ab /src/lib/eiotas_particle.c | |
parent | ad62dda338917350cb678db86a8436a34d045ac9 (diff) | |
download | edoors-1373440eb043ebd121a6827aa28e4832cb959efe.zip edoors-1373440eb043ebd121a6827aa28e4832cb959efe.tar.gz |
cleanup eiotas_particle_has_dst, add eiotas_particle_next_dst
Diffstat (limited to 'src/lib/eiotas_particle.c')
-rw-r--r-- | src/lib/eiotas_particle.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/eiotas_particle.c b/src/lib/eiotas_particle.c index 6d3facc..6148845 100644 --- a/src/lib/eiotas_particle.c +++ b/src/lib/eiotas_particle.c @@ -95,8 +95,13 @@ EAPI void eiotas_particle_merge(Eiotas_Particle *particle, const Eiotas_Particle EAPI Eina_Bool eiotas_particle_has_dst(Eiotas_Particle *particle) { - if(eina_array_count_get(particle->dsts)<=particle->cur_dst) return EINA_FALSE; - return ( (eina_array_data_get(particle->dsts,particle->cur_dst)==NULL) ? EINA_FALSE : EINA_TRUE ); + return ( (eina_array_count_get(particle->dsts)>particle->cur_dst) ? EINA_TRUE : EINA_FALSE ); +} + +EAPI Eina_Bool eiotas_particle_next_dst(Eiotas_Particle *particle) +{ + particle->cur_dst+=1; + return ( (eina_array_count_get(particle->dsts)>particle->cur_dst) ? EINA_TRUE : EINA_FALSE ); } EAPI void eiotas_particle_destinations_add(Eiotas_Particle *particle, const char* destinations) |