# HG changeset patch # User deba # Date 1138201084 0 # Node ID a64e4735bda6461ef9f5cd4fd406eecf4dadb786 # Parent f3d24016dad51321bdc28246ec570bbe0e3db563 Bug fix for empty intervall sorting diff -r f3d24016dad5 -r a64e4735bda6 lemon/radix_sort.h --- a/lemon/radix_sort.h Wed Jan 25 14:40:26 2006 +0000 +++ b/lemon/radix_sort.h Wed Jan 25 14:58:04 2006 +0000 @@ -317,6 +317,7 @@ template void counterSignedSort(Iterator first, Iterator last, Functor functor) { + if (first == last) return; typedef typename std::iterator_traits::value_type Key; typedef std::allocator Allocator; Allocator allocator; @@ -355,6 +356,7 @@ template void counterUnsignedSort(Iterator first, Iterator last, Functor functor) { + if (first == last) return; typedef typename std::iterator_traits::value_type Key; typedef std::allocator Allocator; Allocator allocator;