Decompile fn_19381 (CNaviData::ClearAll)
Batch #12373 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_19381 CNaviData::ClearAll: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
21e1a513ae
commit
b20918bfe3
1 changed files with 8 additions and 8 deletions
|
|
@ -154,19 +154,19 @@ int NaviCell::GetY() const {
|
|||
void CNaviData::ClearAll() {
|
||||
this->Clear();
|
||||
|
||||
for (CNavi_Link*& object : this->objects) {
|
||||
if (object != nullptr) {
|
||||
delete object;
|
||||
for (auto it = this->objects.begin(); it != this->objects.end(); ++it) {
|
||||
if (*it != nullptr) {
|
||||
delete *it;
|
||||
}
|
||||
object = nullptr;
|
||||
*it = nullptr;
|
||||
}
|
||||
this->objects.clear();
|
||||
|
||||
for (CNaviInfo*& info : this->destinations) {
|
||||
if (info != nullptr) {
|
||||
delete info;
|
||||
for (auto it = this->destinations.begin(); it != this->destinations.end(); ++it) {
|
||||
if (*it != nullptr) {
|
||||
delete *it;
|
||||
}
|
||||
info = nullptr;
|
||||
*it = nullptr;
|
||||
}
|
||||
this->destinations.clear();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue