mirror of
https://github.com/taglib/taglib.git
synced 2026-02-15 04:32:59 -05:00
A couple of things pointed out by a colleage -- fix ByteVector::size()
and make the return type semantics consistant for methods that modify the object (specifically, return a reference instead of void). git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@460002 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -81,18 +81,20 @@ typename Map<Key, T>::ConstIterator Map<Key, T>::end() const
|
||||
}
|
||||
|
||||
template <class Key, class T>
|
||||
void Map<Key, T>::insert(const Key &key, const T &value)
|
||||
Map<Key, T> &Map<Key, T>::insert(const Key &key, const T &value)
|
||||
{
|
||||
detach();
|
||||
std::pair<Key, T> item(key, value);
|
||||
d->map.insert(item);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class Key, class T>
|
||||
void Map<Key, T>::clear()
|
||||
Map<Key, T> &Map<Key, T>::clear()
|
||||
{
|
||||
detach();
|
||||
d->map.clear();
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class Key, class T>
|
||||
@ -120,9 +122,10 @@ bool Map<Key, T>::contains(const Key &key) const
|
||||
}
|
||||
|
||||
template <class Key, class T>
|
||||
void Map<Key,T>::erase(Iterator it)
|
||||
Map<Key, T> &Map<Key,T>::erase(Iterator it)
|
||||
{
|
||||
d->map.erase(it);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class Key, class T>
|
||||
|
||||
Reference in New Issue
Block a user