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:
@@ -1181,7 +1181,7 @@ CargoPayment::CargoPayment(Vehicle *front) :
|
|||||||
|
|
||||||
CargoPayment::~CargoPayment()
|
CargoPayment::~CargoPayment()
|
||||||
{
|
{
|
||||||
if (this->CleaningPool()) return;
|
if (CleaningPool()) return;
|
||||||
|
|
||||||
this->front->cargo_payment = nullptr;
|
this->front->cargo_payment = nullptr;
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ RoadStop::~RoadStop()
|
|||||||
if (this->status.Test(RoadStopStatusFlag::BaseEntry)) {
|
if (this->status.Test(RoadStopStatusFlag::BaseEntry)) {
|
||||||
delete this->entries;
|
delete this->entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CleaningPool()) return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ INSTANTIATE_POOL_METHODS(StoryPage)
|
|||||||
|
|
||||||
StoryPage::~StoryPage()
|
StoryPage::~StoryPage()
|
||||||
{
|
{
|
||||||
if (!this->CleaningPool()) {
|
if (CleaningPool()) return;
|
||||||
for (StoryPageElement *spe : StoryPageElement::Iterate()) {
|
|
||||||
if (spe->page == this->index) delete spe;
|
for (StoryPageElement *spe : StoryPageElement::Iterate()) {
|
||||||
}
|
if (spe->page == this->index) delete spe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user