mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Context: Uses inline member initialization
This commit is contained in:
parent
8824d3ae5a
commit
30cfc11f80
2 changed files with 21 additions and 42 deletions
|
@ -74,21 +74,6 @@ static const char* modifierNames[] =
|
||||||
|
|
||||||
#define NUM_MODIFIER_NAMES (sizeof (modifierNames) / sizeof (modifierNames[0]))
|
#define NUM_MODIFIER_NAMES (sizeof (modifierNames) / sizeof (modifierNames[0]))
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
Context::Context ()
|
|
||||||
: rc_file ("~/.taskrc")
|
|
||||||
, data_dir ("~/.task")
|
|
||||||
, config ()
|
|
||||||
, tdb2 ()
|
|
||||||
, determine_color_use (true)
|
|
||||||
, use_color (true)
|
|
||||||
, run_gc (true)
|
|
||||||
, verbosity_legacy (false)
|
|
||||||
, terminal_width (0)
|
|
||||||
, terminal_height (0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Context::~Context ()
|
Context::~Context ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
class Context
|
class Context
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Context (); // Default constructor
|
Context () = default; // Default constructor
|
||||||
~Context (); // Destructor
|
~Context (); // Destructor
|
||||||
|
|
||||||
Context (const Context&);
|
Context (const Context&);
|
||||||
|
@ -77,32 +77,26 @@ private:
|
||||||
void propagateDebug ();
|
void propagateDebug ();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CLI2 cli2;
|
CLI2 cli2 {};
|
||||||
std::string home_dir;
|
std::string home_dir {};
|
||||||
File rc_file;
|
File rc_file {"~/.taskrc"};
|
||||||
Path data_dir;
|
Path data_dir {"~/.task"};
|
||||||
Config config;
|
Config config {};
|
||||||
|
TDB2 tdb2 {};
|
||||||
TDB2 tdb2;
|
Hooks hooks {};
|
||||||
Hooks hooks;
|
bool determine_color_use {true};
|
||||||
|
bool use_color {true};
|
||||||
bool determine_color_use;
|
bool run_gc {true};
|
||||||
bool use_color;
|
bool verbosity_legacy {false};
|
||||||
|
std::set <std::string> verbosity {};
|
||||||
bool run_gc;
|
std::vector <std::string> headers {};
|
||||||
|
std::vector <std::string> footnotes {};
|
||||||
bool verbosity_legacy;
|
std::vector <std::string> errors {};
|
||||||
std::set <std::string> verbosity;
|
std::vector <std::string> debugMessages {};
|
||||||
std::vector <std::string> headers;
|
std::map <std::string, Command*> commands {};
|
||||||
std::vector <std::string> footnotes;
|
std::map <std::string, Column*> columns {};
|
||||||
std::vector <std::string> errors;
|
int terminal_width {0};
|
||||||
std::vector <std::string> debugMessages;
|
int terminal_height {0};
|
||||||
|
|
||||||
std::map <std::string, Command*> commands;
|
|
||||||
std::map <std::string, Column*> columns;
|
|
||||||
|
|
||||||
int terminal_width;
|
|
||||||
int terminal_height;
|
|
||||||
|
|
||||||
Timer timer_total {};
|
Timer timer_total {};
|
||||||
long time_init_us {0};
|
long time_init_us {0};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue