aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-13 16:47:56 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-14 14:04:51 +0200
commitac77bd576083ccecfce128b1bca6ab66d16491ee (patch)
tree01987e69436e43666b3ba965d9fb7afdddae6604
parent2f2408428a9ed9205fdb92cc2cb786949042f256 (diff)
App: remove unused g_app global, make dtor default
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-rw-r--r--src/app.cpp6
-rw-r--r--src/app.hpp2
2 files changed, 1 insertions, 7 deletions
diff --git a/src/app.cpp b/src/app.cpp
index 3ee4379..ac70489 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -39,7 +39,6 @@
namespace wm {
namespace {
-App *g_app;
using nlohmann::json;
@@ -84,9 +83,6 @@ App::App(wl::display *d)
id_alloc{},
pending_events(false),
policy{} {
- assert(g_app == nullptr);
- g_app = this;
-
try {
{
auto l = load_layer_map(
@@ -102,8 +98,6 @@ App::App(wl::display *d)
}
}
-App::~App() { g_app = nullptr; }
-
int App::init() {
if (!this->display->ok()) {
return -1;
diff --git a/src/app.hpp b/src/app.hpp
index aac28cd..9424d9f 100644
--- a/src/app.hpp
+++ b/src/app.hpp
@@ -126,7 +126,7 @@ struct App {
Policy policy;
explicit App(wl::display *d);
- ~App();
+ ~App() = default;
App(App const &) = delete;
App &operator=(App const &) = delete;