mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Task: Improved CppCoreGuideline compliance
This commit is contained in:
parent
08b7b5b800
commit
15373daf85
2 changed files with 8 additions and 23 deletions
12
src/Task.cpp
12
src/Task.cpp
|
@ -88,18 +88,6 @@ std::map <std::string, std::vector <std::string>> Task::customOrder;
|
|||
|
||||
static const std::string dummy ("");
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Task::Task ()
|
||||
: data ()
|
||||
, id (0)
|
||||
, urgency_value (0.0)
|
||||
, recalc_urgency (true)
|
||||
, is_blocked (false)
|
||||
, is_blocking (false)
|
||||
, annotation_count (0)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// The uuid and id attributes must be exempt from comparison.
|
||||
//
|
||||
|
|
19
src/Task.h
19
src/Task.h
|
@ -57,13 +57,11 @@ public:
|
|||
static float urgencyAgeMax;
|
||||
|
||||
public:
|
||||
Task (); // Default constructor
|
||||
Task () = default; // Default constructor
|
||||
bool operator== (const Task&); // Comparison operator
|
||||
Task (const std::string&); // Parse
|
||||
Task (const json::object*); // Parse
|
||||
|
||||
std::map <std::string, std::string> data;
|
||||
|
||||
void parse (const std::string&);
|
||||
std::string composeF4 () const;
|
||||
std::string composeJSON (bool decorate = false) const;
|
||||
|
@ -75,14 +73,13 @@ public:
|
|||
enum dateState {dateNotDue, dateAfterToday, dateLaterToday, dateEarlierToday, dateBeforeToday};
|
||||
|
||||
// Public data.
|
||||
int id;
|
||||
float urgency_value;
|
||||
bool recalc_urgency;
|
||||
|
||||
bool is_blocked;
|
||||
bool is_blocking;
|
||||
|
||||
int annotation_count;
|
||||
std::map <std::string, std::string> data {};
|
||||
int id {0};
|
||||
float urgency_value {0.0};
|
||||
bool recalc_urgency {true};
|
||||
bool is_blocked {false};
|
||||
bool is_blocking {false};
|
||||
int annotation_count {0};
|
||||
|
||||
// Series of helper functions.
|
||||
static status textToStatus (const std::string&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue