From 2a6beffd5f9d6c6fd5374a6c66ef9d83d0cfebf2 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 17 Oct 2012 06:55:24 +0000 Subject: Added isEmpty to Bu::Array, it shoulda' been there all along. --- src/stable/array.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/stable/array.h b/src/stable/array.h index 364a5b3..f765e75 100644 --- a/src/stable/array.h +++ b/src/stable/array.h @@ -279,6 +279,15 @@ namespace Bu return core->pData[core->iSize-1]; } + /** + * Returns true if the array is empty. The capacity has no bearing on + * this, only the size. + */ + bool isEmpty() const + { + return core->iSize==0; + } + /** * Get the current size of the array. *@returns The current size of the array. -- cgit v1.2.3