From faa96dbf6ba299bf5841f2febfca62140e628a7f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 21 Jul 2010 23:36:54 -0700 Subject: [PATCH] Enhancement - sort - Tweaks to the comparison function. --- src/Table.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Table.cpp b/src/Table.cpp index a37c86d85..6d4ef617d 100644 --- a/src/Table.cpp +++ b/src/Table.cpp @@ -605,20 +605,20 @@ bool sort_compare (int left, int right) // nothing < something. if (cell_left == NULL && cell_right != NULL) - return (sort_type == Table::ascendingNumeric || + return (sort_type == Table::ascendingNumeric || sort_type == Table::ascendingCharacter || - sort_type == Table::ascendingPriority || - sort_type == Table::ascendingDate || - sort_type == Table::ascendingDueDate || + sort_type == Table::ascendingPriority || + sort_type == Table::ascendingDate || + sort_type == Table::ascendingDueDate || sort_type == Table::ascendingPeriod) ? true : false; // something > nothing. if (cell_left != NULL && cell_right == NULL) - return (sort_type == Table::ascendingNumeric || + return (sort_type == Table::ascendingNumeric || sort_type == Table::ascendingCharacter || - sort_type == Table::ascendingPriority || - sort_type == Table::ascendingDate || - sort_type == Table::ascendingDueDate || + sort_type == Table::ascendingPriority || + sort_type == Table::ascendingDate || + sort_type == Table::ascendingDueDate || sort_type == Table::ascendingPeriod) ? false : true; // Equally NULL - next column.