1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

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 GitHub
parent 7ffd3b2c48
commit c9b73247e0
3 changed files with 5 additions and 7 deletions

View File

@@ -1181,7 +1181,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;
}
}