1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00

Update CSplitString (#267)

This commit is contained in:
Poggu 2024-10-03 15:55:30 +02:00 committed by GitHub
parent d2709c880c
commit ffbc15d41e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1196,12 +1196,12 @@ class CSplitString: public CUtlVector<char*, CUtlMemory<char*, int> >
public:
CSplitString(const char *pString, const char *pSeparator, bool bIncludeSeparators = false)
{
Construct( pString, &pSeparator, 1, bIncludeSeparators);
Split( pString, 0, &pSeparator, 1, bIncludeSeparators);
}
CSplitString(const char *pString, const char **pSeparators, int nSeparators, bool bIncludeSeparators = false)
{
Construct(pString, pSeparators, nSeparators, bIncludeSeparators);
Split(pString, 0, pSeparators, nSeparators, bIncludeSeparators);
}
~CSplitString()
@ -1214,7 +1214,7 @@ public:
// NOTE: If you want to make Construct() public and implement Purge() here, you'll have to free m_szBuffer there
//
private:
DLL_CLASS_IMPORT void Construct(const char *pString, const char **pSeparators, int nSeparators, bool bIncludeSeparators);
DLL_CLASS_IMPORT void Split(const char *pString, int stringSize, const char **pSeparators, int nSeparators, bool bIncludeSeparators);
void PurgeAndDeleteElements()
{