|
From: <axl...@us...> - 2009-10-10 22:15:36
|
Revision: 552
http://hgengine.svn.sourceforge.net/hgengine/?rev=552&view=rev
Author: axlecrusher
Date: 2009-10-10 22:15:29 +0000 (Sat, 10 Oct 2009)
Log Message:
-----------
add const methods
Modified Paths:
--------------
Mercury2/src/AlignedBuffer.h
Modified: Mercury2/src/AlignedBuffer.h
===================================================================
--- Mercury2/src/AlignedBuffer.h 2009-10-10 21:37:58 UTC (rev 551)
+++ Mercury2/src/AlignedBuffer.h 2009-10-10 22:15:29 UTC (rev 552)
@@ -32,12 +32,14 @@
m_length = 0;
}
- inline unsigned long Length() { return m_length; }
- inline unsigned long LengthInBytes() { return m_length*sizeof(T); }
+ inline unsigned long Length() const { return m_length; }
+ inline unsigned long LengthInBytes() const { return m_length*sizeof(T); }
inline T* Buffer() { return m_data; }
+ inline const T* Buffer() const { return m_data; }
inline T& operator[](unsigned long x) { return m_data[x]; }
+ inline const T& operator[](unsigned long x) const { return m_data[x]; }
private:
unsigned long m_length;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|