mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
FF4 - util.cpp:convertDuration -> Duration
- Replaced util.cpp convertDuration function with Duration object.
This commit is contained in:
parent
5ba1fd6aeb
commit
2e39929d71
7 changed files with 57 additions and 108 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue