Browse Source

🧹 Use empty to check if vector is empty

pull/1638/head
Anders Jenbo 5 years ago
parent
commit
251dce6c89
  1. 2
      Source/DiabloUI/diabloui.cpp
  2. 2
      Source/DiabloUI/dialogs.cpp

2
Source/DiabloUI/diabloui.cpp

@ -924,7 +924,7 @@ void UiRenderItems(const std::vector<UiItemBase *> &items)
bool UiItemMouseEvents(SDL_Event *event, const std::vector<UiItemBase *> &items)
{
if (items.size() == 0) {
if (items.empty()) {
return false;
}

2
Source/DiabloUI/dialogs.cpp

@ -243,7 +243,7 @@ void DialogLoop(const std::vector<UiItemBase *> &items, const std::vector<UiItem
UiHandleEvents(&event);
}
if (renderBehind.size() == 0) {
if (renderBehind.empty()) {
SDL_FillRect(DiabloUiSurface(), nullptr, 0);
} else {
UiRenderItems(renderBehind);

Loading…
Cancel
Save