From e5bb90fdfa93b1865b09a8e4afcb7d854346595b Mon Sep 17 00:00:00 2001 From: Patrick Dehne Date: Sun, 20 Oct 2013 00:36:13 +0200 Subject: [PATCH] Fix constness of Proxy --- beast/utility/PropertyStream.h | 6 +++--- beast/utility/impl/PropertyStream.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/beast/utility/PropertyStream.h b/beast/utility/PropertyStream.h index a3effc707..287149971 100644 --- a/beast/utility/PropertyStream.h +++ b/beast/utility/PropertyStream.h @@ -110,11 +110,11 @@ private: class PropertyStream::Proxy { private: - Map* m_map; + Map const* m_map; std::string m_key; public: - Proxy (Map& map, std::string const& key); + Proxy (Map const& map, std::string const& key); template Proxy& operator= (Value value); @@ -160,7 +160,7 @@ public: { return Proxy (*this, key); } template - Proxy operator[] (Key key) + Proxy operator[] (Key key) const { std::stringstream ss; ss << key; diff --git a/beast/utility/impl/PropertyStream.cpp b/beast/utility/impl/PropertyStream.cpp index 239ba4f67..7afab58f3 100644 --- a/beast/utility/impl/PropertyStream.cpp +++ b/beast/utility/impl/PropertyStream.cpp @@ -56,7 +56,7 @@ PropertyStream::Source& PropertyStream::Item::operator* () const //------------------------------------------------------------------------------ PropertyStream::Proxy::Proxy ( - Map& map, std::string const& key) + Map const& map, std::string const& key) : m_map (&map) , m_key (key) {