Skip to content
Snippets Groups Projects
Commit 20ea6e39 authored by TheHresvelgian's avatar TheHresvelgian
Browse files

made it realize there was no data to delete when starting a tournament with no existing tournament

parent 7b18cbb2
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,8 @@ extern vector<Player*> sortedRankings; ...@@ -22,6 +22,8 @@ extern vector<Player*> sortedRankings;
void startNewTournament() void startNewTournament()
{ {
char answer; char answer;
if (gTournaments.size()!=0)
{
do { do {
cout << endl << "Are you certain you wish to start a new tournament?" cout << endl << "Are you certain you wish to start a new tournament?"
<< "This will delete all existing tournament data, including the player list."; << "This will delete all existing tournament data, including the player list.";
...@@ -34,7 +36,7 @@ void startNewTournament() ...@@ -34,7 +36,7 @@ void startNewTournament()
playerList.clear(); playerList.clear();
sortedRankings.clear(); sortedRankings.clear();
gTournaments.clear(); gTournaments.clear();
}
Tournament* newTournament; Tournament* newTournament;
newTournament = new Tournament; newTournament = new Tournament;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment