Codefix: Remove this-> from static call to CleaningPool. (#14817)

Don't call unnecessarily.
This commit is contained in:
Peter Nelson
2025-11-23 21:37:43 +00:00
committed by dP
parent c41ba21a7b
commit bdceca014d
3 changed files with 5 additions and 7 deletions

View File

@@ -1192,7 +1192,7 @@ CargoPayment::CargoPayment(Vehicle *front) :
CargoPayment::~CargoPayment()
{
if (this->CleaningPool()) return;
if (CleaningPool()) return;
this->front->cargo_payment = nullptr;

View File

@@ -30,8 +30,6 @@ RoadStop::~RoadStop()
if (this->status.Test(RoadStopStatusFlag::BaseEntry)) {
delete this->entries;
}
if (CleaningPool()) return;
}
/**

View File

@@ -39,10 +39,10 @@ INSTANTIATE_POOL_METHODS(StoryPage)
StoryPage::~StoryPage()
{
if (!this->CleaningPool()) {
for (StoryPageElement *spe : StoryPageElement::Iterate()) {
if (spe->page == this->index) delete spe;
}
if (CleaningPool()) return;
for (StoryPageElement *spe : StoryPageElement::Iterate()) {
if (spe->page == this->index) delete spe;
}
}