Context: Uses inline member initialization

This commit is contained in:
Paul Beckingham 2016-11-13 13:12:07 -05:00
parent 8824d3ae5a
commit 30cfc11f80
2 changed files with 21 additions and 42 deletions

View file

@ -74,21 +74,6 @@ static const char* modifierNames[] =
#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 ()
{

View file

@ -41,7 +41,7 @@
class Context
{
public:
Context (); // Default constructor
Context () = default; // Default constructor
~Context (); // Destructor
Context (const Context&);
@ -77,32 +77,26 @@ private:
void propagateDebug ();
public:
CLI2 cli2;
std::string home_dir;
File rc_file;
Path data_dir;
Config config;
TDB2 tdb2;
Hooks hooks;
bool determine_color_use;
bool use_color;
bool run_gc;
bool verbosity_legacy;
std::set <std::string> verbosity;
std::vector <std::string> headers;
std::vector <std::string> footnotes;
std::vector <std::string> errors;
std::vector <std::string> debugMessages;
std::map <std::string, Command*> commands;
std::map <std::string, Column*> columns;
int terminal_width;
int terminal_height;
CLI2 cli2 {};
std::string home_dir {};
File rc_file {"~/.taskrc"};
Path data_dir {"~/.task"};
Config config {};
TDB2 tdb2 {};
Hooks hooks {};
bool determine_color_use {true};
bool use_color {true};
bool run_gc {true};
bool verbosity_legacy {false};
std::set <std::string> verbosity {};
std::vector <std::string> headers {};
std::vector <std::string> footnotes {};
std::vector <std::string> errors {};
std::vector <std::string> debugMessages {};
std::map <std::string, Command*> commands {};
std::map <std::string, Column*> columns {};
int terminal_width {0};
int terminal_height {0};
Timer timer_total {};
long time_init_us {0};