fix: Print Invalid Index only if map not empty in UpdateRestaurantStatus()
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user