ssize_t instead of size_t - #510
This commit is contained in:
		
							parent
							
								
									107c82106c
								
							
						
					
					
						commit
						07486bb3c8
					
				
							
								
								
									
										6
									
								
								extern/imgui_patched/imgui_internal.h
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								extern/imgui_patched/imgui_internal.h
									
									
									
									
										vendored
									
									
								
							|  | @ -605,10 +605,10 @@ struct IMGUI_API ImBitVector | ||||||
|     ImVector<ImU32> Storage; |     ImVector<ImU32> Storage; | ||||||
|     int             BitCount = 0; |     int             BitCount = 0; | ||||||
|     ImBitVector(int sz = 0)                                { if (sz > 0) { Create(sz); } } |     ImBitVector(int sz = 0)                                { if (sz > 0) { Create(sz); } } | ||||||
|     void            Create(int sz)                         { BitCount = sz; Storage.resize((sz + 31) >> 5); memset(Storage.Data, 0, (size_t)Storage.Size * sizeof(Storage.Data[0])); } |     void            Create(int sz)                         { BitCount = sz; Storage.resize((sz + 31) >> 5); memset(Storage.Data, 0, (ssize_t)Storage.Size * sizeof(Storage.Data[0])); } | ||||||
|     void            Clear()                                { Storage.clear(); } |     void            Clear()                                { Storage.clear(); } | ||||||
|     void            ClearAllBits()                         { IM_ASSERT(Storage.Size > 0); memset(Storage.Data, 0, (size_t)Storage.Size * sizeof(Storage.Data[0])); } |     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, (size_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])); } | ||||||
|     bool            TestBit(int n) const                   { IM_ASSERT(n >= 0 && n < BitCount); return ImBitArrayTestBit(Storage.Data, n); } |     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            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)
 |     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)
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 tildearrow
						tildearrow