From a7acc5ebb358c7d72da1f7eec38b81d6d0051dbf Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sun, 6 Sep 2020 09:23:54 -0700 Subject: [PATCH] GetSafe --- IDEHelper/Beef/BfCommon.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/IDEHelper/Beef/BfCommon.h b/IDEHelper/Beef/BfCommon.h index 681be322..14a56bd9 100644 --- a/IDEHelper/Beef/BfCommon.h +++ b/IDEHelper/Beef/BfCommon.h @@ -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;