const-correct on Resource class
fluxgen fluxgen
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
src/Resource.hh
→
src/Resource.hh
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Resource.hh,v 1.4 2002/04/04 14:26:47 fluxgen Exp $ +// $Id: Resource.hh,v 1.5 2002/05/17 10:59:58 fluxgen Exp $ #ifndef RESOURCE_HH #define RESOURCE_HH@@ -74,7 +74,9 @@ inline Resource<T>& operator = (const T& newvalue) { m_value = newvalue; return *this;}
std::string getString(); inline T& operator*(void) { return m_value; } + inline const T& operator*(void) const { return m_value; } inline T *operator->(void) { return &m_value; } + inline const T *operator->(void) const { return &m_value; } private: T m_value, m_defaultval; ResourceManager &m_rm;