Added consistency check for graph files. Totally optional, but wiill notify user if graph file built not for loaded map.
Some minor cosmetic changes and refactoring. Fixed #70. Better now, than never. Implemented #121. Bots auto-kill delays. Bumb the year.
This commit is contained in:
parent
2aba34a24b
commit
d6150a8aba
22 changed files with 171 additions and 82 deletions
|
|
@ -68,6 +68,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static auto &alloc = Allocator::get ();
|
||||
CR_EXPOSE_GLOBAL_SINGLETON (Allocator, alloc);
|
||||
|
||||
CR_NAMESPACE_END
|
||||
|
|
@ -111,6 +111,10 @@ public:
|
|||
#define CR_DECLARE_SCOPED_ENUM(enumName, ...) \
|
||||
CR_DECLARE_SCOPED_ENUM_TYPE(enumName, int32, __VA_ARGS__) \
|
||||
|
||||
// exposes global variable from class singleton
|
||||
#define CR_EXPOSE_GLOBAL_SINGLETON(className, variable) \
|
||||
static auto &variable = className::get () \
|
||||
|
||||
CR_NAMESPACE_END
|
||||
|
||||
// platform-dependant-stuff
|
||||
|
|
|
|||
|
|
@ -453,6 +453,6 @@ public:
|
|||
};
|
||||
|
||||
// expose global http client
|
||||
static auto &http = HttpClient::get ();
|
||||
CR_EXPOSE_GLOBAL_SINGLETON (HttpClient, http);
|
||||
|
||||
CR_NAMESPACE_END
|
||||
|
|
@ -96,6 +96,6 @@ public:
|
|||
};
|
||||
|
||||
// expose global instance
|
||||
static auto &logger = SimpleLogger::get ();
|
||||
CR_EXPOSE_GLOBAL_SINGLETON (SimpleLogger, logger);
|
||||
|
||||
CR_NAMESPACE_END
|
||||
|
|
@ -246,6 +246,6 @@ struct Platform : public Singleton <Platform> {
|
|||
};
|
||||
|
||||
// expose platform singleton
|
||||
static auto &plat = Platform::get ();
|
||||
CR_EXPOSE_GLOBAL_SINGLETON (Platform, plat);
|
||||
|
||||
CR_NAMESPACE_END
|
||||
|
|
@ -60,6 +60,6 @@ public:
|
|||
};
|
||||
|
||||
// expose global random generator
|
||||
static auto &rg = Random::get ();
|
||||
CR_EXPOSE_GLOBAL_SINGLETON (Random, rg);
|
||||
|
||||
CR_NAMESPACE_END
|
||||
|
|
@ -905,7 +905,7 @@ public:
|
|||
};
|
||||
|
||||
// expose global string pool
|
||||
static auto &strings = StringBuffer::get ();
|
||||
CR_EXPOSE_GLOBAL_SINGLETON (StringBuffer, strings);
|
||||
|
||||
// some limited utf8 stuff
|
||||
class Utf8Tools : public Singleton <Utf8Tools> {
|
||||
|
|
@ -1141,6 +1141,6 @@ public:
|
|||
};
|
||||
|
||||
// expose global utf8 tools
|
||||
static auto &utf8tools = Utf8Tools::get ();
|
||||
CR_EXPOSE_GLOBAL_SINGLETON (Utf8Tools, utf8tools);
|
||||
|
||||
CR_NAMESPACE_END
|
||||
Loading…
Add table
Add a link
Reference in a new issue