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

This commit is contained in:
Rubidium
2023-10-20 20:09:58 +02:00
committed by rubidium42
parent f06b3e9846
commit c9276c2959
42 changed files with 58 additions and 58 deletions

View File

@@ -622,8 +622,8 @@ public:
*/
void UpdatePrevNextDisabledState()
{
this->SetWidgetDisabledState(WID_SB_PREV_PAGE, story_pages.size() == 0 || this->IsFirstPageSelected());
this->SetWidgetDisabledState(WID_SB_NEXT_PAGE, story_pages.size() == 0 || this->IsLastPageSelected());
this->SetWidgetDisabledState(WID_SB_PREV_PAGE, story_pages.empty() || this->IsFirstPageSelected());
this->SetWidgetDisabledState(WID_SB_NEXT_PAGE, story_pages.empty() || this->IsLastPageSelected());
this->SetWidgetDirty(WID_SB_PREV_PAGE);
this->SetWidgetDirty(WID_SB_NEXT_PAGE);
}
@@ -869,7 +869,7 @@ public:
this->BuildStoryPageList();
/* Was the last page removed? */
if (this->story_pages.size() == 0) {
if (this->story_pages.empty()) {
this->selected_generic_title.clear();
}
@@ -884,7 +884,7 @@ public:
this->SetSelectedPage(this->story_pages[0]->index);
}
this->SetWidgetDisabledState(WID_SB_SEL_PAGE, this->story_pages.size() == 0);
this->SetWidgetDisabledState(WID_SB_SEL_PAGE, this->story_pages.empty());
this->SetWidgetDirty(WID_SB_SEL_PAGE);
this->UpdatePrevNextDisabledState();
} else if (data >= 0 && this->selected_page_id == data) {