FF4 - util.cpp:convertDuration -> Duration
- Replaced util.cpp convertDuration function with Duration object.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user