1.1 --- a/lemon/radix_sort.h Wed Jan 25 14:40:26 2006 +0000
1.2 +++ b/lemon/radix_sort.h Wed Jan 25 14:58:04 2006 +0000
1.3 @@ -317,6 +317,7 @@
1.4
1.5 template <typename Value, typename Iterator, typename Functor>
1.6 void counterSignedSort(Iterator first, Iterator last, Functor functor) {
1.7 + if (first == last) return;
1.8 typedef typename std::iterator_traits<Iterator>::value_type Key;
1.9 typedef std::allocator<Key> Allocator;
1.10 Allocator allocator;
1.11 @@ -355,6 +356,7 @@
1.12
1.13 template <typename Value, typename Iterator, typename Functor>
1.14 void counterUnsignedSort(Iterator first, Iterator last, Functor functor) {
1.15 + if (first == last) return;
1.16 typedef typename std::iterator_traits<Iterator>::value_type Key;
1.17 typedef std::allocator<Key> Allocator;
1.18 Allocator allocator;