From b2e23eac27427f254d60506089fd0f9a4de2214e Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 17 Jun 2007 22:32:35 +0000 Subject: removed silly reference @ buffer [] operator --- buffer.cpp | 2 +- buffer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buffer.cpp b/buffer.cpp index b1029a6..342373a 100644 --- a/buffer.cpp +++ b/buffer.cpp @@ -115,7 +115,7 @@ u_int8_t* Buffer::getBuf() return buf_; } -u_int8_t& Buffer::operator[](u_int32_t index) +u_int8_t Buffer::operator[](u_int32_t index) { if(index >= length_) throw std::out_of_range("buffer::operator[]"); diff --git a/buffer.h b/buffer.h index aa279d9..6219939 100644 --- a/buffer.h +++ b/buffer.h @@ -46,7 +46,7 @@ public: u_int32_t resize(u_int32_t new_length); u_int32_t getLength() const; u_int8_t* getBuf(); - u_int8_t& operator[](u_int32_t index); + u_int8_t operator[](u_int32_t index); u_int8_t const& operator[](u_int32_t index) const; protected: -- cgit v1.2.3