From c51817d8d575a6095e3076c3e66534983566a633 Mon Sep 17 00:00:00 2001 From: titiger Date: Tue, 16 Dec 2014 01:49:26 +0100 Subject: [PATCH] fixed missing cast found by Coverity CID 1232666 --- source/shared_lib/sources/map/map_preview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/shared_lib/sources/map/map_preview.cpp b/source/shared_lib/sources/map/map_preview.cpp index cc9fd782..e3c1208d 100644 --- a/source/shared_lib/sources/map/map_preview.cpp +++ b/source/shared_lib/sources/map/map_preview.cpp @@ -992,9 +992,9 @@ void MapPreview::sinRandomize(int strenght) { float sinV1 = random.randRange(5.f, 40.f); float sinV2 = random.randRange(5.f, 40.f); float ah = static_cast(10 + random.randRange(-2, 2)); - float bh = static_cast((maxHeight - minHeight) / random.randRange(2, 3)); + float bh = static_cast((maxHeight - minHeight)) / static_cast(random.randRange(2, 3)); float av = static_cast(10 + random.randRange(-2, 2)); - float bv = static_cast((maxHeight - minHeight) / random.randRange(2, 3)); + float bv = static_cast((maxHeight - minHeight)) / static_cast(random.randRange(2, 3)); for (int i = 0; i < w; ++i) { for (int j = 0; j < h; ++j) {