Enhancement - Context
- Context is now a global variable, otherwise it will end up being passed to every function, which is essentially the same as global, and will create a horrible coupling problem.
This commit is contained in:
@@ -50,6 +50,8 @@
|
|||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Context context;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
static std::string shortUsage (Config& conf)
|
static std::string shortUsage (Config& conf)
|
||||||
{
|
{
|
||||||
@@ -317,9 +319,6 @@ int main (int argc, char** argv)
|
|||||||
srand (time (NULL));
|
srand (time (NULL));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// TODO 1.8.0 requires the Context.
|
|
||||||
Context context;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
context.initialize (argc, argv);
|
context.initialize (argc, argv);
|
||||||
|
|||||||
Reference in New Issue
Block a user