Made some bitbuf getters const

This commit is contained in:
Jordan Cristiano 2015-06-17 02:01:43 -04:00
parent df008f5a73
commit 4bf5cea15b

View File

@ -216,9 +216,9 @@ public:
// How many bytes are filled in? // How many bytes are filled in?
int GetNumBytesWritten() const; int GetNumBytesWritten() const;
int GetNumBitsWritten() const; int GetNumBitsWritten() const;
int GetMaxNumBits(); int GetMaxNumBits() const;
int GetNumBitsLeft(); int GetNumBitsLeft() const;
int GetNumBytesLeft(); int GetNumBytesLeft() const;
unsigned char* GetData(); unsigned char* GetData();
const unsigned char* GetData() const; const unsigned char* GetData() const;
@ -264,17 +264,17 @@ inline int bf_write::GetNumBitsWritten() const
return m_iCurBit; return m_iCurBit;
} }
inline int bf_write::GetMaxNumBits() inline int bf_write::GetMaxNumBits() const
{ {
return m_nDataBits; return m_nDataBits;
} }
inline int bf_write::GetNumBitsLeft() inline int bf_write::GetNumBitsLeft() const
{ {
return m_nDataBits - m_iCurBit; return m_nDataBits - m_iCurBit;
} }
inline int bf_write::GetNumBytesLeft() inline int bf_write::GetNumBytesLeft() const
{ {
return GetNumBitsLeft() >> 3; return GetNumBitsLeft() >> 3;
} }
@ -624,9 +624,9 @@ public:
// Status. // Status.
public: public:
int GetNumBytesLeft(); int GetNumBytesLeft() const;
int GetNumBytesRead(); int GetNumBytesRead() const;
int GetNumBitsLeft(); int GetNumBitsLeft() const;
int GetNumBitsRead() const; int GetNumBitsRead() const;
// Has the buffer overflowed? // Has the buffer overflowed?
@ -665,17 +665,17 @@ private:
// Inlines. // Inlines.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
inline int bf_read::GetNumBytesRead() inline int bf_read::GetNumBytesRead() const
{ {
return BitByte(m_iCurBit); return BitByte(m_iCurBit);
} }
inline int bf_read::GetNumBitsLeft() inline int bf_read::GetNumBitsLeft() const
{ {
return m_nDataBits - m_iCurBit; return m_nDataBits - m_iCurBit;
} }
inline int bf_read::GetNumBytesLeft() inline int bf_read::GetNumBytesLeft() const
{ {
return GetNumBitsLeft() >> 3; return GetNumBitsLeft() >> 3;
} }