Codechange: replace x.size() != 0 with !x.empty()

This commit is contained in:
Rubidium
2023-10-20 20:22:49 +02:00
committed by rubidium42
parent f16399f4c9
commit 37f84b7372
11 changed files with 12 additions and 12 deletions

View File

@@ -222,7 +222,7 @@ class ReplaceVehicleWindow : public Window {
/* We need to rebuild the left engines list */
this->GenerateReplaceVehList(true);
this->vscroll[0]->SetCount(this->engines[0].size());
if (this->reset_sel_engine && this->sel_engine[0] == INVALID_ENGINE && this->engines[0].size() != 0) {
if (this->reset_sel_engine && this->sel_engine[0] == INVALID_ENGINE && !this->engines[0].empty()) {
this->sel_engine[0] = this->engines[0][0].engine_id;
}
}