CLI2: Migrated static methods
- The old CLI object has three static methods that are used for extracting information from the command line before parsing takes place. These include rc.name:value and rc:value and code that applies those overrides to Context::Config. These methods are moved to CLI2 - being static it makes no difference where they reside. - Context::initialize now calls the CLI2 versions only.
This commit is contained in:
@@ -110,7 +110,6 @@ int Context::initialize (int argc, const char** argv)
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CLI2::getOverride (argc, argv, home_dir, rc_file);
|
||||
CLI::getOverride (argc, argv, home_dir, rc_file);
|
||||
|
||||
char* override = getenv ("TASKRC");
|
||||
if (override)
|
||||
@@ -122,7 +121,6 @@ int Context::initialize (int argc, const char** argv)
|
||||
config.clear ();
|
||||
config.load (rc_file);
|
||||
CLI2::applyOverrides (argc, argv);
|
||||
CLI::applyOverrides (argc, argv);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -136,7 +134,6 @@ int Context::initialize (int argc, const char** argv)
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CLI2::getDataLocation (argc, argv, data_dir);
|
||||
CLI::getDataLocation (argc, argv, data_dir);
|
||||
|
||||
override = getenv ("TASKDATA");
|
||||
if (override)
|
||||
|
||||
Reference in New Issue
Block a user