mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Timew: Configuration is now passed to dispatch
This commit is contained in:
parent
890bb7fc9b
commit
44c9924dc5
3 changed files with 7 additions and 3 deletions
|
@ -47,7 +47,11 @@ void initializeRules (Configuration& configuration, Rules& rules)
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int dispatchCommand (int argc, const char** argv, Rules& rules)
|
int dispatchCommand (
|
||||||
|
int argc,
|
||||||
|
const char** argv,
|
||||||
|
Configuration& configuration,
|
||||||
|
Rules& rules)
|
||||||
{
|
{
|
||||||
int status {0};
|
int status {0};
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ int main (int argc, const char** argv)
|
||||||
initializeRules (configuration, rules);
|
initializeRules (configuration, rules);
|
||||||
|
|
||||||
// Dispatch to commands.
|
// Dispatch to commands.
|
||||||
status = dispatchCommand (argc, argv, rules);
|
status = dispatchCommand (argc, argv, configuration, rules);
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (const std::string& error)
|
catch (const std::string& error)
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
// init.cpp
|
// init.cpp
|
||||||
void initializeData (Configuration&, Database&);
|
void initializeData (Configuration&, Database&);
|
||||||
void initializeRules (Configuration&, Rules&);
|
void initializeRules (Configuration&, Rules&);
|
||||||
int dispatchCommand (int, const char**, Rules&);
|
int dispatchCommand (int, const char**, Configuration&, Rules&);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue