aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-05-27 16:26:01 +0200
committersalaaad2 <arthurdurant263@gmail.com>2022-05-27 16:26:01 +0200
commit8dc03eedfcf24be94f0255c0c9e055dbb83ea092 (patch)
tree4b032f5b17df8da8acb2e41de99afc78a3bcebe2 /src/main.cpp
parentupdate readme (diff)
downloadthreshold-8dc03eedfcf24be94f0255c0c9e055dbb83ea092.tar.gz
threshold-8dc03eedfcf24be94f0255c0c9e055dbb83ea092.tar.bz2
threshold-8dc03eedfcf24be94f0255c0c9e055dbb83ea092.tar.xz
threshold-8dc03eedfcf24be94f0255c0c9e055dbb83ea092.tar.zst
threshold-8dc03eedfcf24be94f0255c0c9e055dbb83ea092.zip
less leaks and effective-c++-compatible
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index cb0894e..409c86e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -84,12 +84,12 @@ int main(void) {
next += game->getNext();
saveOut << game->getCurrent();
- delete game;
CloseAudioDevice();
- std::cout << "next level " << next << std::endl;
if (game->getNext() != "0") {
+ delete game;
game = new Game(next);
gs = GAMEPLAY;
+ std::cout << "next level " << next << std::endl;
}
}
break;