Skip to content

Commit 06fa47c

Browse files
committed
Use size_t for xr_alloc()
1 parent d4cf071 commit 06fa47c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/xrCore/Memory/xalloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class xalloc
2929
xalloc(const xalloc<_Other>&) {}
3030
template<class _Other>
3131
xalloc<T>& operator=(const xalloc<_Other>&) { return *this; }
32-
pointer allocate(size_type n, const void* p = nullptr) const { return xr_alloc<T>((u32)n); }
32+
pointer allocate(size_type n, const void* p = nullptr) const { return xr_alloc<T>(n); }
3333
char* _charalloc(size_type n) { return (char*)allocate(n); }
3434
void deallocate(pointer p, size_type n) const { xr_free(p); }
3535
void deallocate(void* p, size_type n) const { xr_free(p); }

src/xrCore/xrMemory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ extern XRCORE_API xrMemory Memory;
101101
#ifdef DEBUG_MEMORY_NAME
102102
#include "typeinfo.h"
103103
template <class T>
104-
IC T* xr_alloc(u32 count)
104+
IC T* xr_alloc(size_t count)
105105
{ return (T*)Memory.mem_alloc(count*sizeof(T), typeid(T).name()); }
106106

107107
#else
108108
template <class T>
109-
IC T* xr_alloc(u32 count)
109+
IC T* xr_alloc(size_t count)
110110
{ return (T*)Memory.mem_alloc(count * sizeof(T)); }
111111

112112
#endif

0 commit comments

Comments
 (0)