mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-04-20 09:55:38 +00:00
replace size_t casts to pointers with (u)intptr_t.
This commit is contained in:
parent
3c8611f604
commit
2d9eb310bc
2 changed files with 3 additions and 3 deletions
|
@ -295,7 +295,7 @@ void Q_memset (void *dest, int fill, size_t count)
|
|||
{
|
||||
size_t i;
|
||||
|
||||
if ( (((size_t)dest | count) & 3) == 0)
|
||||
if ( (((uintptr_t)dest | count) & 3) == 0)
|
||||
{
|
||||
count >>= 2;
|
||||
fill = fill | (fill<<8) | (fill<<16) | (fill<<24);
|
||||
|
@ -311,7 +311,7 @@ void Q_memcpy (void *dest, const void *src, size_t count)
|
|||
{
|
||||
size_t i;
|
||||
|
||||
if (( ( (size_t)dest | (size_t)src | count) & 3) == 0 )
|
||||
if (( ( (uintptr_t)dest | (uintptr_t)src | count) & 3) == 0)
|
||||
{
|
||||
count >>= 2;
|
||||
for (i = 0; i < count; i++)
|
||||
|
|
|
@ -109,7 +109,7 @@ COMPILE_TIME_ASSERT(enum, sizeof(THE_DUMMY_ENUM) == sizeof(int));
|
|||
* This variant works on most (but not *all*) systems...
|
||||
*/
|
||||
#ifndef offsetof
|
||||
#define offsetof(t,m) ((size_t)&(((t *)0)->m))
|
||||
#define offsetof(t,m) ((intptr_t)&(((t *)0)->m))
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue