1.1 --- a/sourcehook/sh_list.h Sun Oct 21 21:55:17 2007 +0000
1.2 +++ b/sourcehook/sh_list.h Thu Nov 01 01:58:44 2007 +0000
1.3 @@ -103,6 +103,20 @@
1.4 insert(begin(), obj);
1.5 }
1.6
1.7 + void push_sorted(const T &obj)
1.8 + {
1.9 + iterator iter;
1.10 + for (iter = begin(); iter != end(); ++iter)
1.11 + {
1.12 + if (obj < *iter)
1.13 + {
1.14 + insert(iter, obj);
1.15 + return;
1.16 + }
1.17 + }
1.18 + push_back(obj);
1.19 + }
1.20 +
1.21 size_t size() const
1.22 {
1.23 return m_Size;
1.24 @@ -301,6 +315,7 @@
1.25 return *this;
1.26 }
1.27 };
1.28 +
1.29 }; //NAMESPACE
1.30
1.31 #endif //_INCLUDE_CSDM_LIST_H