From: Marcus Fritzsch Date: Mon, 26 Jun 2017 11:20:05 +0000 (+0200) Subject: wayland: display unique_ptr holds a void(*)(...) deleter X-Git-Tag: 4.99.1~310 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=0f8562c512b461f24ef2ea9e61bdc20a1ef602f0;p=staging%2Fwindowmanager.git wayland: display unique_ptr holds a void(*)(...) deleter Signed-off-by: Marcus Fritzsch --- diff --git a/src/wayland.cpp b/src/wayland.cpp index 2bae9e8..950335a 100644 --- a/src/wayland.cpp +++ b/src/wayland.cpp @@ -15,14 +15,18 @@ namespace wl { // \__,_|_|___/ .__/|_|\__,_|\__, | // |_| |___/ display::display() - : d(std::unique_ptr>( + : d(std::unique_ptr( wl_display_connect(NULL), +#ifdef DEBUG_OUTPUT [](struct wl_display *d) { logdebug("wl::display ~display @ %p", d); wl_display_disconnect(d); })), - r(d.get()) {} +#else + &wl_display_disconnect)), +#endif + r(d.get()) { +} display::~display() {} diff --git a/src/wayland.hpp b/src/wayland.hpp index ba1effd..7ff1145 100644 --- a/src/wayland.hpp +++ b/src/wayland.hpp @@ -66,8 +66,7 @@ struct registry : public wayland_proxy { // \__,_|_|___/ .__/|_|\__,_|\__, | // |_| |___/ struct display { - std::unique_ptr> - d; + std::unique_ptr d; struct registry r; display();