Fix constness of Proxy

This commit is contained in:
Patrick Dehne
2013-10-20 00:36:13 +02:00
committed by Vinnie Falco
parent ac0142a49e
commit e5bb90fdfa
2 changed files with 4 additions and 4 deletions

View File

@@ -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 <typename Value>
Proxy& operator= (Value value);
@@ -160,7 +160,7 @@ public:
{ return Proxy (*this, key); }
template <typename Key>
Proxy operator[] (Key key)
Proxy operator[] (Key key) const
{
std::stringstream ss;
ss << key;

View File

@@ -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)
{