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:
parent
7211381672
commit
e8fd27fb0c
1 changed files with 26 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue