Re: [IMP-dev] [IMP-commits] r566 - in trunk/kernel: include/IMP include/IMP/internal pyext src src/restraints src/score_states
> > Modified: trunk/kernel/include/IMP/internal/ParticleGrid.h > =================================================================== > --- trunk/kernel/include/IMP/internal/ParticleGrid.h 2008-05-17 > 00:35:56 UTC (rev 565) > +++ trunk/kernel/include/IMP/internal/ParticleGrid.h 2008-05-18 > 07:07:11 UTC (rev 566) > @@ -158,8 +158,8 @@ > } > bool operator==(const ParticleVoxelIterator &o) const { > return cvoxel_== o.cvoxel_ && (cvoxel_ == evoxel_ > - && o.cvoxel_ == o.evoxel_ > - || curp_ == o.curp_); > + && (o.cvoxel_ == o.evoxel_ > + || curp_ == o.curp_)); > } > bool operator!=(const ParticleVoxelIterator &o) const { > return !operator==(o); >
This changes the logic and I don't think it is correct.
BTW, what didn't gcc 4.3 like with the Keys? Thanks.
Daniel Russel wrote: >> - && o.cvoxel_ == o.evoxel_ >> - || curp_ == o.curp_); >> + && (o.cvoxel_ == o.evoxel_ >> + || curp_ == o.curp_)); > This changes the logic and I don't think it is correct.
g++ 4.3 gets very uneasy about bunches of && and || without explicit parentheses, so I put them in. It's entirely possible I put them in the wrong place though...
> BTW, what didn't gcc 4.3 like with the Keys? Thanks.
It didn't like this line in AttributeTable.h, because the Key typedef hides the Key class: typedef Key<T> Key;
Ben
On May 19, 2008, at 11:08 AM, Ben Webb wrote:
> Daniel Russel wrote: >>> - && o.cvoxel_ == o.evoxel_ >>> - || curp_ == o.curp_); >>> + && (o.cvoxel_ == o.evoxel_ >>> + || curp_ == o.curp_)); >> This changes the logic and I don't think it is correct. > > g++ 4.3 gets very uneasy about bunches of && and || without explicit > parentheses, so I put them in. It's entirely possible I put them in > the > wrong place though... It went from a && (b&&c || d) to a &&(b && (c || d)). I believe the former is correct:
If they are in the same cell and (either they are both done with the cell or they both point to the same point)
participants (2)
-
Ben Webb
-
Daniel Russel