summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2010-03-19 00:39:01 +0000
committerjhurst <>2010-03-19 00:39:01 +0000
commit6413d43575d39c8560673515ca7e75e1e2c789a9 (patch)
treeb0940a81767fe1d2f2934e6e85f2e9321ddee370
parentdcf9b994a20789e9ea97521cf2a3aa206f3d92a2 (diff)
const, baby
-rwxr-xr-xREADME4
-rwxr-xr-xsrc/KM_memio.h13
2 files changed, 9 insertions, 8 deletions
diff --git a/README b/README
index 8dfe2b9..b91a54d 100755
--- a/README
+++ b/README
@@ -115,8 +115,8 @@ Change History
NEW STUFF:
o Changed AudioDescriptor "SampelRate" element name to "EditRate"
to make it consistent with the other types.
-
-o Now builds with XercesC 3.x
+ o Now builds with XercesC 3.x
+ o KM_memio.h has better const behavior
2010.01.05 - bug fixes, enhancements, v1.5.32
diff --git a/src/KM_memio.h b/src/KM_memio.h
index cea6862..9c906d5 100755
--- a/src/KM_memio.h
+++ b/src/KM_memio.h
@@ -61,9 +61,10 @@ namespace Kumu
inline void Reset() { m_size = 0; }
inline byte_t* Data() { return m_p; }
+ inline const byte_t* RoData() const { return m_p; }
inline byte_t* CurrentData() { return m_p + m_size; }
- inline ui32_t Length() { return m_size; }
- inline ui32_t Remainder() { return m_capacity - m_size; }
+ inline ui32_t Length() const { return m_size; }
+ inline ui32_t Remainder() const { return m_capacity - m_size; }
inline bool AddOffset(ui32_t offset) {
if ( ( m_size + offset ) > m_capacity )
@@ -143,10 +144,10 @@ namespace Kumu
~MemIOReader() {}
inline void Reset() { m_size = 0; }
- inline const byte_t* Data() { return m_p; }
- inline const byte_t* CurrentData() { return m_p + m_size; }
- inline ui32_t Offset() { return m_size; }
- inline ui32_t Remainder() { return m_capacity - m_size; }
+ inline const byte_t* Data() const { return m_p; }
+ inline const byte_t* CurrentData() const { return m_p + m_size; }
+ inline ui32_t Offset() const { return m_size; }
+ inline ui32_t Remainder() const { return m_capacity - m_size; }
inline bool SkipOffset(ui32_t offset) {
if ( ( m_size + offset ) > m_capacity )