From 050a98d63d00ba70cd48ab98e7ed54a27d178140 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 31 May 2022 15:31:21 -0500 Subject: [PATCH] Revert "ssize_t instead of size_t - #510" This reverts commit 07486bb3c84ddf9b563a5d2af33b9ff4cba77129. --- extern/imgui_patched/imgui_internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extern/imgui_patched/imgui_internal.h b/extern/imgui_patched/imgui_internal.h index 40e439fa..be3ab922 100644 --- a/extern/imgui_patched/imgui_internal.h +++ b/extern/imgui_patched/imgui_internal.h @@ -605,10 +605,10 @@ struct IMGUI_API ImBitVector ImVector Storage; int BitCount = 0; ImBitVector(int sz = 0) { if (sz > 0) { Create(sz); } } - void Create(int sz) { BitCount = sz; Storage.resize((sz + 31) >> 5); memset(Storage.Data, 0, (ssize_t)Storage.Size * sizeof(Storage.Data[0])); } + void Create(int sz) { BitCount = sz; Storage.resize((sz + 31) >> 5); memset(Storage.Data, 0, (size_t)Storage.Size * sizeof(Storage.Data[0])); } void Clear() { Storage.clear(); } - void ClearAllBits() { IM_ASSERT(Storage.Size > 0); memset(Storage.Data, 0, (ssize_t)Storage.Size * sizeof(Storage.Data[0])); } - void SetAllBits() { IM_ASSERT(Storage.Size > 0); memset(Storage.Data, 255, (ssize_t)Storage.Size * sizeof(Storage.Data[0])); } + void ClearAllBits() { IM_ASSERT(Storage.Size > 0); memset(Storage.Data, 0, (size_t)Storage.Size * sizeof(Storage.Data[0])); } + void SetAllBits() { IM_ASSERT(Storage.Size > 0); memset(Storage.Data, 255, (size_t)Storage.Size * sizeof(Storage.Data[0])); } bool TestBit(int n) const { IM_ASSERT(n >= 0 && n < BitCount); return ImBitArrayTestBit(Storage.Data, n); } void SetBit(int n) { IM_ASSERT(n >= 0 && n < BitCount); ImBitArraySetBit(Storage.Data, n); } void SetBitRange(int n, int n2) { IM_ASSERT(n >= 0 && n < BitCount && n2 > n && n2 <= BitCount); ImBitArraySetBitRange(Storage.Data, n, n2); } // Works on range [n..n2)