summaryrefslogtreecommitdiff
path: root/modules/dds
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-03-08 15:10:48 +0100
committerRĂ©mi Verschelde <rverschelde@gmail.com>2022-03-09 16:24:32 +0100
commit39d429e49705fe153a20dfb27421f1246237a683 (patch)
treece97a5171b951dc2e31ff12b84ce3a0637862ddc /modules/dds
parent922348f4c00e694961a7c9717abdcd0310c11973 (diff)
Change some math macros to constexpr
Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`.
Diffstat (limited to 'modules/dds')
-rw-r--r--modules/dds/texture_loader_dds.cpp4
1 files changed, 2 insertions, 2 deletions
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;