Mercurial > LightClone
diff LightClone/Source/ArrayList.h @ 19:51718795f019
Adding event handling & drag and drop to GuiInterface
author | koryspansel |
---|---|
date | Thu, 15 Sep 2011 12:13:40 -0700 |
parents | ee1c2510096d |
children | b4dc5d674e22 |
line wrap: on
line diff
--- a/LightClone/Source/ArrayList.h Wed Sep 14 17:24:49 2011 -0700 +++ b/LightClone/Source/ArrayList.h Thu Sep 15 12:13:40 2011 -0700 @@ -82,6 +82,27 @@ } /* + * Remove + */ + ErrorCode Remove(Type& kItem) + { + for(uint32 i = 0; i < nSize; ++i) + { + if(pList[i] == kItem) + { + --nSize; + + for(; i < nSize; ++i) + pList[i] = pList[i + 1]; + + return Error_Success; + } + } + + return Error_Fail; + } + + /* * Clear */ void Clear() @@ -90,9 +111,9 @@ } /* - * GetSize + * Size */ - uint32 GetSize() const + uint32 Size() const { return nSize; }