mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-27 10:41:15 -06:00
Fixes of MutablePolygon
This commit is contained in:
parent
1c2d264570
commit
00295919bf
2 changed files with 42 additions and 13 deletions
|
|
@ -85,7 +85,7 @@ public:
|
|||
}
|
||||
|
||||
void advance_front() {
|
||||
assert(!this->empty());
|
||||
assert(! this->empty());
|
||||
if (m_begin == m_end)
|
||||
this->make_empty();
|
||||
else
|
||||
|
|
@ -93,7 +93,7 @@ public:
|
|||
}
|
||||
|
||||
void retract_back() {
|
||||
assert(!this->empty());
|
||||
assert(! this->empty());
|
||||
if (m_begin == m_end)
|
||||
this->make_empty();
|
||||
else
|
||||
|
|
@ -101,13 +101,13 @@ public:
|
|||
}
|
||||
|
||||
MutablePolygon::iterator remove_front(MutablePolygon::iterator it) {
|
||||
if (m_begin == it)
|
||||
if (! this->empty() && m_begin == it)
|
||||
this->advance_front();
|
||||
return it.remove();
|
||||
}
|
||||
|
||||
MutablePolygon::iterator remove_back(MutablePolygon::iterator it) {
|
||||
if (m_end == it)
|
||||
if (! this->empty() && m_end == it)
|
||||
this->retract_back();
|
||||
return it.remove();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue