mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
pgraphnodes: Fix compile warning on 32-bit in SceneGraphAnalyzer
This commit is contained in:
parent
f3d51fd72c
commit
316b8e96eb
@ -35,10 +35,13 @@
|
|||||||
static std::string smart_mem_string(size_t bytes) {
|
static std::string smart_mem_string(size_t bytes) {
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
float fbytes = static_cast<float>(bytes);
|
float fbytes = static_cast<float>(bytes);
|
||||||
|
#if SIZE_MAX > 4294967296
|
||||||
if (bytes > 4294967296) { // 4 GiB
|
if (bytes > 4294967296) { // 4 GiB
|
||||||
out << std::setprecision(3) << fbytes / 1024.0 / 1024.0 / 1024.0 << " 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";
|
out << std::setprecision(3) << fbytes / 1024.0 / 1024.0 << " MiB";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user