refactor(bar): prefer standard unique_ptr

This commit is contained in:
Alexis
2018-08-11 12:49:28 +02:00
parent 8d5b61a9fd
commit 6ff296a4b0
7 changed files with 18 additions and 1415 deletions

View File

@ -49,7 +49,7 @@ void waybar::Client::_handle_global(void *data, struct wl_registry *registry,
auto output = std::make_unique<struct wl_output *>();
*output = (struct wl_output *)wl_registry_bind(registry, name,
&wl_output_interface, version);
o->bars.emplace_back(*o, std::move(output));
o->bars.emplace_back(std::make_unique<Bar>(*o, std::move(output)));
} else if (!strcmp(interface, wl_seat_interface.name)) {
o->seat = (struct wl_seat *)wl_registry_bind(registry, name,
&wl_seat_interface, version);