diff options
author | Eugene Sandulenko | 2004-12-16 21:33:58 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-12-16 21:33:58 +0000 |
commit | 13a4006b691529fc00612234e88d73bfcef8787d (patch) | |
tree | 098f9e4e11c3d9766a312c7c2c9880f24b25b03c /saga | |
parent | af5996f99a674fd5416770f25f196fdb2f5873ad (diff) | |
download | scummvm-rg350-13a4006b691529fc00612234e88d73bfcef8787d.tar.gz scummvm-rg350-13a4006b691529fc00612234e88d73bfcef8787d.tar.bz2 scummvm-rg350-13a4006b691529fc00612234e88d73bfcef8787d.zip |
Proper fix for line endings.
svn-id: r16089
Diffstat (limited to 'saga')
-rw-r--r-- | saga/list.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/saga/list.h b/saga/list.h index 4038c0f2fb..9497033794 100644 --- a/saga/list.h +++ b/saga/list.h @@ -21,6 +21,7 @@ #ifndef SAGA_LIST_H__ #define SAGA_LIST_H__ + #include "common/list.h" namespace Saga { @@ -29,10 +30,12 @@ template <class T> class SortedList : public Common::List<T> { public: typedef int ( CompareFunction ) (const T& , const T&); + typedef typename Common::List<T>::iterator iterator; typedef typename Common::List<T>::const_iterator const_iterator; public: + iterator pushFront(const T& element) { return insert(Common::List<T>::begin(), element); } @@ -87,6 +90,7 @@ public: while (i != Common::List<T>::end()) { res = compareFunction(i.operator*(), pos.operator*()); if (res <= 0) { + T temp(*pos); erase(pos); ++i; @@ -105,6 +109,7 @@ public: while (i != Common::List<T>::end()) { res = compareFunction(i.operator*(), pos.operator*()); if (res >= 0) { + T temp(*pos); erase(pos); return insert(i, temp); @@ -143,5 +148,7 @@ public: return false; } }; + } // End of namespace Saga -#endif
\ No newline at end of file + +#endif |