mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
GetSafe
This commit is contained in:
parent
a650c7ab9c
commit
a7acc5ebb3
1 changed files with 7 additions and 0 deletions
|
@ -119,6 +119,13 @@ public:
|
|||
val = mVals[idx];
|
||||
}
|
||||
|
||||
T GetSafe(intptr idx)
|
||||
{
|
||||
if ((idx < 0) || (idx >= mSize))
|
||||
return T();
|
||||
return mVals[idx];
|
||||
}
|
||||
|
||||
Iterator begin() const
|
||||
{
|
||||
return mVals;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue