diff options
Diffstat (limited to 'plugins/SmileyAdd/src/smileys.h')
-rw-r--r-- | plugins/SmileyAdd/src/smileys.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/SmileyAdd/src/smileys.h b/plugins/SmileyAdd/src/smileys.h index 4e174987d0..c44f1858fb 100644 --- a/plugins/SmileyAdd/src/smileys.h +++ b/plugins/SmileyAdd/src/smileys.h @@ -112,17 +112,15 @@ template<class T> struct SMOBJLIST : public OBJLIST<T> SMOBJLIST<T>& operator += (const SMOBJLIST<T>& lst)
{
- for (int i = 0; i < lst.getCount(); i++) {
- T *p = new T(lst[i]);
- insert(p);
- }
+ for (auto &it : lst)
+ insert(new T(*it));
return *this;
}
void splice(SMOBJLIST<T> &lst)
{
- for (int i = 0; i < lst.getCount(); i++)
- insert(&lst[i]);
+ for (auto &it : lst)
+ insert(it);
lst.LIST<T>::destroy();
}
};
|