1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Merge pull request #1083 from disarray2077/dict_enumerator_remove

Add Remove method to Dictionary Enumerators
This commit is contained in:
Brian Fiete 2021-06-25 06:13:58 -07:00 committed by GitHub
commit bcdf652b99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -864,6 +864,16 @@ namespace System.Collections
mDictionary.mEntries[mCurrentIndex].mValue = value; mDictionary.mEntries[mCurrentIndex].mValue = value;
} }
public void Remove() mut
{
int_cosize curIdx = mIndex - 1;
mDictionary.Remove(mDictionary.mEntries[curIdx].mKey);
#if VERSION_DICTIONARY
mVersion = mDictionary.mVersion;
#endif
mIndex = curIdx;
}
public void Reset() mut public void Reset() mut
{ {
#if VERSION_DICTIONARY #if VERSION_DICTIONARY
@ -1005,6 +1015,16 @@ namespace System.Collections
{ {
} }
public void Remove() mut
{
int_cosize curIdx = mIndex - 1;
mDictionary.Remove(mDictionary.mEntries[curIdx].mKey);
#if VERSION_DICTIONARY
mVersion = mDictionary.mVersion;
#endif
mIndex = curIdx;
}
public void Reset() mut public void Reset() mut
{ {
#if VERSION_DICTIONARY #if VERSION_DICTIONARY
@ -1101,6 +1121,16 @@ namespace System.Collections
{ {
} }
public void Remove() mut
{
int_cosize curIdx = mIndex - 1;
mDictionary.Remove(mDictionary.mEntries[curIdx].mKey);
#if VERSION_DICTIONARY
mVersion = mDictionary.mVersion;
#endif
mIndex = curIdx;
}
public void Reset() mut public void Reset() mut
{ {
#if VERSION_DICTIONARY #if VERSION_DICTIONARY