Codechange: replace x.size() == 0 with x.empty()
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user