mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-07 02:28:22 +00:00
Correct CUtlHashtableEntry data type
Resolves compile time errors for key types larger that 4 bytes
This commit is contained in:
parent
2551ced759
commit
f1573c3515
@ -1770,7 +1770,7 @@ inline void ValidateAlignmentExplicit(void)
|
||||
// Alignment must be a multiple of the size of the object type, or elements will *NOT* be aligned!
|
||||
ALIGN_ASSERT((sizeof(T) % ALIGN) == 0);
|
||||
// Alignment should be a multiple of the base alignment of T
|
||||
// ALIGN_ASSERT((ALIGN % VALIGNOF(T)) == 0);
|
||||
ALIGN_ASSERT((ALIGN % VALIGNOF(T)) == 0);
|
||||
// Alignment must not be bigger than the maximum declared alignment used by DECLARE_ALIGNED_BYTE_ARRAY
|
||||
// (if you hit this, just add more powers of 2 below and increase this limit)
|
||||
ALIGN_ASSERT( ALIGN <= 128 );
|
||||
|
||||
@ -74,7 +74,7 @@ public:
|
||||
};
|
||||
|
||||
storage_t flags_and_hash;
|
||||
AlignedByteArrayExplicit_t<(sizeof( KVPair ) + sizeof( storage_t ) - 1) / sizeof( storage_t ), storage_t, MAX( alignof(KVPair), alignof(storage_t) )> data;
|
||||
AlignedByteArray_t<1, KVPair> data;
|
||||
|
||||
bool IsValid() const { return flags_and_hash >= 0; }
|
||||
void MarkInvalid() { int32 flag = FLAG_FREE; flags_and_hash = (storage_t)flag; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user