mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-15 02:29:10 +00:00
Codechange: replace x.size() == 0 with x.empty()
This commit is contained in:
@@ -280,7 +280,7 @@ struct AIConfigWindow : public Window {
|
||||
this->SetWidgetDisabledState(WID_AIC_DECREASE_INTERVAL, GetGameSettings().difficulty.competitors_interval == MIN_COMPETITORS_INTERVAL);
|
||||
this->SetWidgetDisabledState(WID_AIC_INCREASE_INTERVAL, GetGameSettings().difficulty.competitors_interval == MAX_COMPETITORS_INTERVAL);
|
||||
this->SetWidgetDisabledState(WID_AIC_CHANGE, this->selected_slot == INVALID_COMPANY);
|
||||
this->SetWidgetDisabledState(WID_AIC_CONFIGURE, this->selected_slot == INVALID_COMPANY || AIConfig::GetConfig(this->selected_slot)->GetConfigList()->size() == 0);
|
||||
this->SetWidgetDisabledState(WID_AIC_CONFIGURE, this->selected_slot == INVALID_COMPANY || AIConfig::GetConfig(this->selected_slot)->GetConfigList()->empty());
|
||||
this->SetWidgetDisabledState(WID_AIC_MOVE_UP, this->selected_slot == INVALID_COMPANY || !IsEditable((CompanyID)(this->selected_slot - 1)));
|
||||
this->SetWidgetDisabledState(WID_AIC_MOVE_DOWN, this->selected_slot == INVALID_COMPANY || !IsEditable((CompanyID)(this->selected_slot + 1)));
|
||||
|
||||
|
@@ -94,7 +94,7 @@ AIInfo *AIScannerInfo::SelectRandomAI() const
|
||||
|
||||
AIInfo *AIScannerInfo::FindInfo(const std::string &name, int version, bool force_exact_match)
|
||||
{
|
||||
if (this->info_list.size() == 0) return nullptr;
|
||||
if (this->info_list.empty()) return nullptr;
|
||||
if (name.empty()) return nullptr;
|
||||
|
||||
if (version == -1) {
|
||||
|
Reference in New Issue
Block a user