fix: Print Invalid Index only if map not empty in UpdateRestaurantStatus()

This commit is contained in:
Joel Thomas
2026-02-20 00:26:11 +05:30
parent 284a2a4cc5
commit 0636dd9398
@@ -282,7 +282,7 @@ void FoodDeliveryController::updateRestaurantStatus() const
listRestaurants();
std::cout << "Updated Restaurant " << restaurantIterator->second->getName() << " successfully\n";
}
else
else if (!restaurantOwner.getRestaurants().empty())
{
std::cout << "Invalid Index. Cannot update Restaurant status!\n";
return;