fix(splay_map): add 'const' to coersion operator of ref class
[skip ci]
This commit is contained in:
parent
54e63fd4de
commit
60157aa92a
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ public:
|
||||||
public:
|
public:
|
||||||
ref(splay_map & m, K const & k):m_map(m), m_key(k) {}
|
ref(splay_map & m, K const & k):m_map(m), m_key(k) {}
|
||||||
ref & operator=(T const & v) { m_map.insert(m_key, v); return *this; }
|
ref & operator=(T const & v) { m_map.insert(m_key, v); return *this; }
|
||||||
operator T const &() {
|
operator T const &() const {
|
||||||
entry const * e = m_map.find(m_key);
|
entry const * e = m_map.find(m_key);
|
||||||
if (e) {
|
if (e) {
|
||||||
return e->second;
|
return e->second;
|
||||||
|
|
Loading…
Reference in a new issue