diff options
Diffstat (limited to 'src/x.cc')
| -rw-r--r-- | src/x.cc | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -123,7 +123,7 @@ private: if (supported_ || !conn_) return; ensure_cookies(); auto cookie = xcb_ewmh_get_supported(&ewmh_, screen_); - supported_.reset(new xcb_ewmh_get_atoms_reply_t()); + supported_ = std::make_unique<xcb_ewmh_get_atoms_reply_t>(); if (!xcb_ewmh_get_supported_reply(&ewmh_, cookie, supported_.get(), nullptr)) { conn_.reset(); @@ -140,13 +140,13 @@ private: } // namespace // static -Atoms* Atoms::create(shared_connection const& conn) { - return new AtomsImpl(conn); +std::unique_ptr<Atoms> Atoms::create(shared_connection const& conn) { + return std::make_unique<AtomsImpl>(conn); } // static -Ewmh* Ewmh::create(shared_connection const& conn, int screen) { - return new EwmhImpl(conn, screen); +std::unique_ptr<Ewmh> Ewmh::create(shared_connection const& conn, int screen) { + return std::make_unique<EwmhImpl>(conn, screen); } xcb_screen_t const* get_screen(xcb_connection_t* conn, int screen) { |
