From 65236fe2d5483d50224d81741638d07a0fc15504 Mon Sep 17 00:00:00 2001 From: Davi Date: Sun, 7 May 2023 11:01:20 -0300 Subject: [PATCH] Fix building the Windows x86_32 target In x86_32, `ULONG_PTR` and `SIZE_T` are defined as `unsigned long`, which is not a type supported by Variant without the `NEED_LONG_INT` define. --- platform/windows/os_windows.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 5a749a9d6f5..a13d6ed986c 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -706,16 +706,16 @@ Dictionary OS_Windows::get_memory_info() const { } if (pref_info.PhysicalTotal * pref_info.PageSize != 0) { - meminfo["physical"] = pref_info.PhysicalTotal * pref_info.PageSize; + meminfo["physical"] = static_cast(pref_info.PhysicalTotal * pref_info.PageSize); } if (pref_info.PhysicalAvailable * pref_info.PageSize != 0) { - meminfo["free"] = pref_info.PhysicalAvailable * pref_info.PageSize; + meminfo["free"] = static_cast(pref_info.PhysicalAvailable * pref_info.PageSize); } if (pref_info.CommitLimit * pref_info.PageSize != 0) { - meminfo["available"] = pref_info.CommitLimit * pref_info.PageSize; + meminfo["available"] = static_cast(pref_info.CommitLimit * pref_info.PageSize); } if (HighLimit - LowLimit != 0) { - meminfo["stack"] = HighLimit - LowLimit; + meminfo["stack"] = static_cast(HighLimit - LowLimit); } return meminfo;