clean up math varsize complaints

This commit is contained in:
AzaezelX 2023-04-27 16:10:04 -05:00
parent 1230d0d280
commit 0ce2da3a23
30 changed files with 61 additions and 56 deletions

View file

@ -91,7 +91,7 @@
//! \see CopyMemory
inline_ void MoveMemory(void* dest, const void* src, udword size) { memmove(dest, src, size); }
#define SIZEOFOBJECT sizeof(*this) //!< Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)").
#define SIZEOFOBJECT udword(sizeof(*this)) //!< Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)").
//#define CLEAROBJECT { memset(this, 0, SIZEOFOBJECT); } //!< Clears current object. Laziness is my business. HANDLE WITH CARE.
#define DELETESINGLE(x) if (x) { delete x; x = null; } //!< Deletes an instance of a class.
#define DELETEARRAY(x) if (x) { delete []x; x = null; } //!< Deletes an array.

View file

@ -31,7 +31,7 @@
/* Data access */ \
inline_ const base_class* GetPos() const { return (base_class*)mData; } \
inline_ const base_class* GetNeg() const { return ((base_class*)mData)+1; } \
inline_ udword GetPrimitive() const { return (mData>>1); } \
inline_ udword GetPrimitive() const { return (udword(mData>>1)); } \
/* Stats */ \
inline_ udword GetNodeSize() const { return SIZEOFOBJECT; } \
\
@ -50,8 +50,8 @@
/* Data access */ \
inline_ const base_class* GetPos() const { return (base_class*)mPosData; } \
inline_ const base_class* GetNeg() const { return (base_class*)mNegData; } \
inline_ udword GetPosPrimitive() const { return (mPosData>>1); } \
inline_ udword GetNegPrimitive() const { return (mNegData>>1); } \
inline_ udword GetPosPrimitive() const { return (udword(mPosData>>1)); } \
inline_ udword GetNegPrimitive() const { return (udword(mNegData>>1)); } \
/* Stats */ \
inline_ udword GetNodeSize() const { return SIZEOFOBJECT; } \
\