diff options
author | lloyd <[email protected]> | 2012-04-09 23:31:53 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-04-09 23:31:53 +0000 |
commit | 4d3857119ad0bc7d231b5c0812c07d964f68398f (patch) | |
tree | 80cc64d3aec10934bd9420be89e781d90bce303a | |
parent | cc041b2a855331b33a6458377498625b05f076bb (diff) |
The comments incorrectly described end as returning the last element,
rather than one past the end. Reported by Stuart Maclean on the
mailing list.
-rw-r--r-- | src/alloc/secmem.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/alloc/secmem.h b/src/alloc/secmem.h index 6c8a75c44..2552343d6 100644 --- a/src/alloc/secmem.h +++ b/src/alloc/secmem.h @@ -59,14 +59,14 @@ class MemoryRegion const T* begin() const { return buf; } /** - * Get a pointer to the last element in the buffer. - * @return pointer to the last element in the buffer + * Get a pointer to one past the last element in the buffer. + * @return pointer to one past the last element in the buffer */ T* end() { return (buf + size()); } /** - * Get a constant pointer to the last element in the buffer. - * @return constant pointer to the last element in the buffer + * Get a const pointer to one past the last element in the buffer. + * @return const pointer to one past the last element in the buffer */ const T* end() const { return (buf + size()); } |