From da31121507db2d92cfbd707d2a08afa9bddf34c2 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 23 Oct 2010 15:44:55 +0000 Subject: SAGA: Improve comment for ByteArray::getBuffer() svn-id: r53736 --- engines/saga/saga.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/saga') diff --git a/engines/saga/saga.h b/engines/saga/saga.h index 8008cf7bdb..aa66a06352 100644 --- a/engines/saga/saga.h +++ b/engines/saga/saga.h @@ -460,8 +460,11 @@ inline uint16 objectIndexToId(int type, int index) { class ByteArray : public Common::Array { public: - - byte * getBuffer() { // call this method instead of "&front()" if you insure of array emptyness state + /** + * Return a pointer to the start of the buffer underlying this byte array, + * or NULL if the buffer is empty. + */ + byte *getBuffer() { return empty() ? NULL : &front(); } }; -- cgit v1.2.3