Mercurial > hg > octave-lyh
diff liboctave/oct-sort.cc @ 8725:d5af326a3ede
[mq]: sort-traits
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 12 Feb 2009 02:49:14 -0500 |
parents | e9cb742df9eb |
children | de16ebeef93d |
line wrap: on
line diff
--- a/liboctave/oct-sort.cc +++ b/liboctave/oct-sort.cc @@ -111,7 +111,7 @@ } template <class T> -octave_sort<T>::octave_sort (bool (*comp) (T, T)) : compare (comp) +octave_sort<T>::octave_sort (compare_fcn_type comp) : compare (comp) { merge_init (); } @@ -1763,14 +1763,16 @@ template <class T> bool -octave_sort<T>::ascending_compare (T x, T y) +octave_sort<T>::ascending_compare (typename ref_param<T>::type x, + typename ref_param<T>::type y) { return x < y; } template <class T> bool -octave_sort<T>::descending_compare (T x, T y) +octave_sort<T>::descending_compare (typename ref_param<T>::type x, + typename ref_param<T>::type y) { return x > y; }