probably fix compile on systems where sizeof(int) < sizeof(void*)
This commit is contained in:
@@ -142,7 +142,7 @@ inline unsigned int GetAlignment(T *dummy=NULL) // VC60 workaround
|
|||||||
|
|
||||||
inline bool IsAlignedOn(const void *p, unsigned int alignment)
|
inline bool IsAlignedOn(const void *p, unsigned int alignment)
|
||||||
{
|
{
|
||||||
return IsPowerOf2(alignment) ? ModPowerOf2((unsigned int)p, alignment) == 0 : (unsigned int)p % alignment == 0;
|
return IsPowerOf2(alignment) ? ModPowerOf2((intptr_t)p, alignment) == 0 : (intptr_t)p % alignment == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|||||||
Reference in New Issue
Block a user