Task: Improved CppCoreGuideline compliance
This commit is contained in:
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 ("");
|
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.
|
// 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;
|
static float urgencyAgeMax;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Task (); // Default constructor
|
Task () = default; // Default constructor
|
||||||
bool operator== (const Task&); // Comparison operator
|
bool operator== (const Task&); // Comparison operator
|
||||||
Task (const std::string&); // Parse
|
Task (const std::string&); // Parse
|
||||||
Task (const json::object*); // Parse
|
Task (const json::object*); // Parse
|
||||||
|
|
||||||
std::map <std::string, std::string> data;
|
|
||||||
|
|
||||||
void parse (const std::string&);
|
void parse (const std::string&);
|
||||||
std::string composeF4 () const;
|
std::string composeF4 () const;
|
||||||
std::string composeJSON (bool decorate = false) const;
|
std::string composeJSON (bool decorate = false) const;
|
||||||
@@ -75,14 +73,13 @@ public:
|
|||||||
enum dateState {dateNotDue, dateAfterToday, dateLaterToday, dateEarlierToday, dateBeforeToday};
|
enum dateState {dateNotDue, dateAfterToday, dateLaterToday, dateEarlierToday, dateBeforeToday};
|
||||||
|
|
||||||
// Public data.
|
// Public data.
|
||||||
int id;
|
std::map <std::string, std::string> data {};
|
||||||
float urgency_value;
|
int id {0};
|
||||||
bool recalc_urgency;
|
float urgency_value {0.0};
|
||||||
|
bool recalc_urgency {true};
|
||||||
bool is_blocked;
|
bool is_blocked {false};
|
||||||
bool is_blocking;
|
bool is_blocking {false};
|
||||||
|
int annotation_count {0};
|
||||||
int annotation_count;
|
|
||||||
|
|
||||||
// Series of helper functions.
|
// Series of helper functions.
|
||||||
static status textToStatus (const std::string&);
|
static status textToStatus (const std::string&);
|
||||||
|
|||||||
Reference in New Issue
Block a user