From 3993102e880f2a31b6fef9484b8527a58e850744 Mon Sep 17 00:00:00 2001 From: Craig Robbins Date: Mon, 29 Dec 2014 23:53:08 +1000 Subject: Fix -Wtype-limits warnings and remove disabling of -Wtype-limits --- src/map.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 7a58c90c7..1c1cd7c28 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1766,7 +1766,11 @@ void Map::transformLiquids(std::map & modified_blocks) content_t new_node_content; s8 new_node_level = -1; s8 max_node_level = -1; - u8 range = rangelim(nodemgr->get(liquid_kind).liquid_range, 0, LIQUID_LEVEL_MAX+1); + + u8 range = nodemgr->get(liquid_kind).liquid_range; + if (range > LIQUID_LEVEL_MAX+1) + range = LIQUID_LEVEL_MAX+1; + if ((num_sources >= 2 && nodemgr->get(liquid_kind).liquid_renewable) || liquid_type == LIQUID_SOURCE) { // liquid_kind will be set to either the flowing alternative of the node (if it's a liquid) // or the flowing alternative of the first of the surrounding sources (if it's air), so -- cgit v1.2.3