The non-const functions here should call detach.

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@572630 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Scott Wheeler 2006-08-13 12:29:26 +00:00
parent 545c9ebeb7
commit 71a392fe81

View File

@ -106,6 +106,7 @@ bool Map<Key, T>::isEmpty() const
template <class Key, class T>
typename Map<Key, T>::Iterator Map<Key, T>::find(const Key &key)
{
detach();
return d->map.find(key);
}
@ -124,6 +125,7 @@ bool Map<Key, T>::contains(const Key &key) const
template <class Key, class T>
Map<Key, T> &Map<Key,T>::erase(Iterator it)
{
detach();
d->map.erase(it);
return *this;
}
@ -143,7 +145,8 @@ const T &Map<Key, T>::operator[](const Key &key) const
template <class Key, class T>
T &Map<Key, T>::operator[](const Key &key)
{
return d->map[key];
detach();
return d->map[key];
}
template <class Key, class T>