From: Nicolas Abril Date: Tue, 10 Mar 2020 19:30:42 +0000 (+0000) Subject: Remove unnecessary checks before delete (#9500) X-Git-Tag: 5.2.0~80 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=30d795b4b260291377e22e59a774e0f9278742e6;p=oweals%2Fminetest.git Remove unnecessary checks before delete (#9500) Co-authored-by: Nicolas Abril --- 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; }