Skip to content

Commit a6cc0a0

Browse files
committed
finish
1 parent b430bd9 commit a6cc0a0

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,17 +1232,17 @@ int
12321232
Sliver_perturber<C3T3,Md,Sc,V_>::
12331233
update_priority_queue(const PVertex& pv, PQueue& pqueue) const
12341234
{
1235-
typename PQueue::handle cont = pqueue.contains(pv);
1236-
if ( cont != pqueue.end())
1235+
typename PQueue::handle h = pqueue.contains(pv);
1236+
if ( h != pqueue.end())
12371237
{
12381238
if ( pv.is_perturbable() )
12391239
{
1240-
pqueue.update(pv, cont);
1240+
pqueue.update(pv, h);
12411241
return 0;
12421242
}
12431243
else
12441244
{
1245-
pqueue.remove(cont);
1245+
pqueue.remove(h);
12461246
return -1;
12471247
}
12481248
}

Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h>
2929
#include <CGAL/Modifiable_priority_queue.h>
3030
#include <CGAL/algorithm.h>
31+
#include<CGAL/assertions.h>
3132

3233
// Needed for Polygon_2
3334

@@ -36,7 +37,6 @@
3637
#include <CGAL/Constrained_triangulation_plus_2.h>
3738
#include <list>
3839

39-
4040
namespace CGAL {
4141

4242
#ifndef DOXYGEN_RUNNING
@@ -325,14 +325,14 @@ operator()()
325325

326326
if((*u)->is_removable()){
327327
boost::optional<FT> dist = cost(pct, u);
328+
bool found;
329+
typename MPQ::handle h =mpq->contains(*u, found);
328330
if(! dist){
329331
// cost is undefined
330-
if( mpq->contains(*u) ){
331-
mpq->erase(*u);
332+
if( found ){
333+
mpq->erase(h);
332334
}
333335
} else {
334-
bool found;
335-
typename MPQ::handle h =mpq->contains(*u, found);
336336
if(found){
337337
(*u)->set_cost(*dist);
338338
mpq->update(*u, h);
@@ -345,13 +345,13 @@ operator()()
345345

346346
if((*w)->is_removable()){
347347
boost::optional<FT> dist = cost(pct, w);
348+
bool found;
349+
typename MPQ::handle h =mpq->contains(*w, found);
348350
if(! dist)
349351
// cost is undefined
350-
if( mpq->contains(*w) ){
351-
mpq->erase(*w);
352+
if( found){
353+
mpq->erase(h);
352354
} else {
353-
bool found;
354-
typename MPQ::handle h =mpq->contains(*w, found);
355355
if(found){
356356
(*w)->set_cost(*dist);
357357
mpq->update(*w, h);

STL_Extension/include/CGAL/Modifiable_priority_queue.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class Modifiable_priority_queue
110110

111111
handle erase ( value_type const& v, handle ) { mHeap.remove(v); return null_handle() ; }
112112
handle erase ( value_type const& v ) { mHeap.remove(v); return null_handle() ; }
113+
handle erase ( handle h) { mHeap.remove(h); return null_handle() ; }
113114

114115
value_type top() const { return mHeap.top() ; }
115116

0 commit comments

Comments
 (0)