1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 15:26:00 +02:00

Added IsEmpty property

This commit is contained in:
Brian Fiete 2020-05-15 08:50:27 -07:00
parent 7211381672
commit e8fd27fb0c

View file

@ -266,6 +266,32 @@ namespace Beefy.utils
get { return GetCurrent().GetType() == typeof(NamedValues); }
}
public bool IsEmpty
{
get
{
if (mCurrent.mLastValue != -1)
{
if (mValues[mCurrent.mLastValue] != sEmptySentinel)
return false;
else
{
// We need a (potentially) full value pass if we have sEmptySentinel
int checkValue = mCurrent.mValues.mValueIdx;
while (checkValue != -1)
{
if (mValues[checkValue] != sEmptySentinel)
{
return false;
}
checkValue = mNextValues[checkValue];
}
}
}
return true;
}
}
public int GetValueCount()
{
int count = 0;