mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-30 01:03:30 +01:00
Apply several clang-tidy fixes
This commit is contained in:
parent
529470f1d0
commit
dcdb7442a4
@ -86,12 +86,10 @@ void Triangle::MarkNeighbor(Triangle& t)
|
|||||||
void Triangle::Clear()
|
void Triangle::Clear()
|
||||||
{
|
{
|
||||||
Triangle *t;
|
Triangle *t;
|
||||||
for( int i=0; i<3; i++ )
|
for (auto& neighbor : neighbors_) {
|
||||||
{
|
t = neighbor;
|
||||||
t = neighbors_[i];
|
if (t != nullptr) {
|
||||||
if( t != nullptr )
|
t->ClearNeighbor(this);
|
||||||
{
|
|
||||||
t->ClearNeighbor( this );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClearNeighbors();
|
ClearNeighbors();
|
||||||
@ -410,4 +408,4 @@ bool IsDelaunay(const std::vector<p2t::Triangle*>& triangles)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} // namespace p2t
|
||||||
|
@ -107,4 +107,4 @@ AdvancingFront::~AdvancingFront()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} // namespace p2t
|
||||||
|
@ -815,10 +815,9 @@ void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle&
|
|||||||
Sweep::~Sweep() {
|
Sweep::~Sweep() {
|
||||||
|
|
||||||
// Clean up memory
|
// Clean up memory
|
||||||
for(size_t i = 0; i < nodes_.size(); i++) {
|
for (auto& node : nodes_) {
|
||||||
delete nodes_[i];
|
delete node;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace p2t
|
} // namespace p2t
|
||||||
|
@ -194,17 +194,13 @@ SweepContext::~SweepContext()
|
|||||||
delete af_middle_;
|
delete af_middle_;
|
||||||
delete af_tail_;
|
delete af_tail_;
|
||||||
|
|
||||||
typedef std::list<Triangle*> type_list;
|
for (auto ptr : map_) {
|
||||||
|
|
||||||
for(type_list::iterator iter = map_.begin(); iter != map_.end(); ++iter) {
|
|
||||||
Triangle* ptr = *iter;
|
|
||||||
delete ptr;
|
delete ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(unsigned int i = 0; i < edge_list.size(); i++) {
|
for (auto& i : edge_list) {
|
||||||
delete edge_list[i];
|
delete i;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace p2t
|
} // namespace p2t
|
||||||
|
Loading…
Reference in New Issue
Block a user