From 316b8e96eb5571b9914c3ea989f78857d2a72f66 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 24 Feb 2023 23:11:55 +0100 Subject: [PATCH] pgraphnodes: Fix compile warning on 32-bit in SceneGraphAnalyzer --- panda/src/pgraphnodes/sceneGraphAnalyzer.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraphnodes/sceneGraphAnalyzer.cxx b/panda/src/pgraphnodes/sceneGraphAnalyzer.cxx index bf9a895573..6d9a8678c7 100644 --- a/panda/src/pgraphnodes/sceneGraphAnalyzer.cxx +++ b/panda/src/pgraphnodes/sceneGraphAnalyzer.cxx @@ -35,10 +35,13 @@ static std::string smart_mem_string(size_t bytes) { std::ostringstream out; float fbytes = static_cast(bytes); +#if SIZE_MAX > 4294967296 if (bytes > 4294967296) { // 4 GiB out << std::setprecision(3) << fbytes / 1024.0 / 1024.0 / 1024.0 << " GiB"; } - else if (bytes > 10485760) { // 10 MiB + else +#endif + if (bytes > 10485760) { // 10 MiB out << std::setprecision(3) << fbytes / 1024.0 / 1024.0 << " MiB"; } else {