From d048545f1a3327fac9be844e9be6a6a48282f09a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 4 Jun 2018 12:20:41 +0200 Subject: [PATCH] lib/dbus/Connection: add DBusConnection& cast operator --- src/lib/dbus/Connection.hxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/dbus/Connection.hxx b/src/lib/dbus/Connection.hxx index 43347070d..b42b9d582 100644 --- a/src/lib/dbus/Connection.hxx +++ b/src/lib/dbus/Connection.hxx @@ -76,6 +76,10 @@ public: return c; } + operator DBusConnection &() noexcept { + return *c; + } + operator bool() const noexcept { return c != nullptr; }