Changeset 51d33c5 for molecuilder


Ignore:
Timestamp:
Oct 14, 2008, 1:26:02 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
7a3724
Parents:
26f52a
Message:

BUGFIX: Tesselation::AddPoint() always increased Tesselation::PointsOnBoundaryCount, even if point was present already

+ we look at PointTestPair->second to determine whether point was present before or not, and only increase Tesselation::PointsOnBoundaryCount if true

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/boundary.cpp

    r26f52a r51d33c5  
    934934void Tesselation::AddPoint(atom *Walker)
    935935{
     936  PointTestPair InsertUnique;
    936937  BPS[0] = new class BoundaryPointSet(Walker);
    937   PointsOnBoundary.insert( PointPair(Walker->nr, BPS[0]) );
    938   PointsOnBoundaryCount++;
    939 };
     938  InsertUnique = PointsOnBoundary.insert( PointPair(Walker->nr, BPS[0]) );
     939  if (InsertUnique.second)  // if new point was not present before, increase counter
     940    PointsOnBoundaryCount++;
     941};
Note: See TracChangeset for help on using the changeset viewer.