diff options
author | Nicolas Abril <nicolas.abril@gmail.com> | 2020-03-10 19:30:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-10 20:30:42 +0100 |
commit | 30d795b4b260291377e22e59a774e0f9278742e6 (patch) | |
tree | 3f6a9d4de8380805198104dd7da180d45f9614d4 /src | |
parent | 0cb34ce158989b66ecd42257dbed6729a338ff1e (diff) | |
download | minetest-30d795b4b260291377e22e59a774e0f9278742e6.tar.gz minetest-30d795b4b260291377e22e59a774e0f9278742e6.tar.bz2 minetest-30d795b4b260291377e22e59a774e0f9278742e6.zip |
Remove unnecessary checks before delete (#9500)
Co-authored-by: Nicolas Abril <nicolasabril@alunos.utfpr.edu.br>
Diffstat (limited to 'src')
-rw-r--r-- | src/map.cpp | 3 | ||||
-rw-r--r-- | src/mapgen/mapgen_fractal.cpp | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/map.cpp b/src/map.cpp index a6b9d398f..40aba067e 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1285,8 +1285,7 @@ ServerMap::~ServerMap() Close database if it was opened */ delete dbase; - if (dbase_ro) - delete dbase_ro; + delete dbase_ro; #if 0 /* diff --git a/src/mapgen/mapgen_fractal.cpp b/src/mapgen/mapgen_fractal.cpp index cabe0b850..96febb4f4 100644 --- a/src/mapgen/mapgen_fractal.cpp +++ b/src/mapgen/mapgen_fractal.cpp @@ -90,9 +90,7 @@ MapgenFractal::MapgenFractal(MapgenFractalParams *params, EmergeManager *emerge) MapgenFractal::~MapgenFractal() { - if (noise_seabed) - delete noise_seabed; - + delete noise_seabed; delete noise_filler_depth; } |