FF4 - util.cpp:convertDuration -> Duration

- Replaced util.cpp convertDuration function with Duration object.
This commit is contained in:
Paul Beckingham 2009-05-16 22:14:32 -04:00
parent 5ba1fd6aeb
commit 2e39929d71
7 changed files with 57 additions and 108 deletions

View file

@ -48,6 +48,7 @@
#include <assert.h>
#include <Table.h>
#include <Date.h>
#include <Duration.h>
#include <task.h>
////////////////////////////////////////////////////////////////////////////////
@ -989,7 +990,7 @@ void Table::sort (std::vector <int>& order)
break;
else if ((std::string)*left != "" && (std::string)*right == "")
SWAP
else if (convertDuration ((std::string)*left) > convertDuration ((std::string)*right))
else if (Duration ((std::string)*left) > Duration ((std::string)*right))
SWAP
break;
@ -998,7 +999,7 @@ void Table::sort (std::vector <int>& order)
break;
else if ((std::string)*left == "" && (std::string)*right != "")
SWAP
else if (convertDuration ((std::string)*left) < convertDuration ((std::string)*right))
else if (Duration ((std::string)*left) < Duration ((std::string)*right))
SWAP
break;
}