diff --git a/client/windows/CCastleInterface.cpp b/client/windows/CCastleInterface.cpp index 58e67e7b1..7655443c9 100644 --- a/client/windows/CCastleInterface.cpp +++ b/client/windows/CCastleInterface.cpp @@ -399,7 +399,7 @@ void CHeroGSlot::gesture(bool on, const Point & initialPosition, const Point & f std::vector> resComps; for(TResources::nziterator i(upgradableSlots.totalCosts); i.valid(); i++) resComps.push_back(std::make_shared(ComponentType::RESOURCE, i->resType, i->resVal)); - if(!resComps.size()) + if(resComps.empty()) resComps.push_back(std::make_shared(ComponentType::RESOURCE, static_cast(GameResID::GOLD), 0)); // add at least gold, when there are no costs resComps.back()->newLine = true; for(auto & upgradeInfo : upgradableSlots.upgradeInfos)