1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 12:06:07 +08:00

Correct CUtlLeanVector::IsIdxValid method

This commit is contained in:
GAMMACASE
2025-08-18 23:50:59 +03:00
parent 93ccb6b7b2
commit c80e0e5fee

View File

@ -64,7 +64,7 @@ public:
// Element removal // Element removal
void RemoveAll(); // doesn't deallocate memory void RemoveAll(); // doesn't deallocate memory
bool IsIdxValid( I i ) const { return (i >= 0) && (i < NumAllocated()); } bool IsIdxValid( I i ) const { return (i >= 0) && (i < m_nCount); }
// Memory deallocation // Memory deallocation
void Purge(); void Purge();
@ -286,7 +286,7 @@ public:
// Element removal // Element removal
void RemoveAll(); // doesn't deallocate memory void RemoveAll(); // doesn't deallocate memory
bool IsIdxValid( I i ) const { return (i >= 0) && (i < NumAllocated()); } bool IsIdxValid( I i ) const { return (i >= 0) && (i < m_nCount); }
// Memory deallocation // Memory deallocation
void Purge(); void Purge();