mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Remove unused members in Application class
Also rearrange a bit the remining methods. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
50f92bed06
commit
bb1b049b83
2 changed files with 3 additions and 14 deletions
|
@ -65,13 +65,9 @@ Application::~Application() {
|
||||||
|
|
||||||
void Application::initialize() {
|
void Application::initialize() {
|
||||||
|
|
||||||
instance();
|
// A static Application object is allocated
|
||||||
}
|
// once only when this function is called.
|
||||||
|
|
||||||
Application& Application::instance() {
|
|
||||||
|
|
||||||
static Application singleton;
|
static Application singleton;
|
||||||
return singleton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::exit_with_failure() {
|
void Application::exit_with_failure() {
|
||||||
|
|
|
@ -29,18 +29,11 @@ class Application {
|
||||||
|
|
||||||
Application();
|
Application();
|
||||||
Application(const Application&);
|
Application(const Application&);
|
||||||
|
~Application();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void initialize();
|
static void initialize();
|
||||||
static void exit_with_failure();
|
static void exit_with_failure();
|
||||||
|
|
||||||
~Application();
|
|
||||||
|
|
||||||
private:
|
|
||||||
static Application& instance();
|
|
||||||
|
|
||||||
void init();
|
|
||||||
void deallocateAll();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !defined(APPLICATION_H_INCLUDED)
|
#endif // !defined(APPLICATION_H_INCLUDED)
|
||||||
|
|
Loading…
Add table
Reference in a new issue