From 30d795b4b260291377e22e59a774e0f9278742e6 Mon Sep 17 00:00:00 2001 From: Nicolas Abril Date: Tue, 10 Mar 2020 19:30:42 +0000 Subject: Remove unnecessary checks before delete (#9500) Co-authored-by: Nicolas Abril --- src/map.cpp | 3 +-- src/mapgen/mapgen_fractal.cpp | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3