From 39d429e49705fe153a20dfb27421f1246237a683 Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 8 Mar 2022 15:10:48 +0100 Subject: Change some math macros to constexpr Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`. --- modules/dds/texture_loader_dds.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/dds') diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp index c422c3bd6b..7bfe849106 100644 --- a/modules/dds/texture_loader_dds.cpp +++ b/modules/dds/texture_loader_dds.cpp @@ -225,8 +225,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, ERR_FAIL_COND_V(!(flags & DDSD_LINEARSIZE), RES()); for (uint32_t i = 1; i < mipmaps; i++) { - w = MAX(1, w >> 1); - h = MAX(1, h >> 1); + w = MAX(1u, w >> 1); + h = MAX(1u, h >> 1); uint32_t bsize = MAX(info.divisor, w) / info.divisor * MAX(info.divisor, h) / info.divisor * info.block_size; //printf("%i x %i - block: %i\n",w,h,bsize); size += bsize; -- cgit v1.2.3