mirror of
https://github.com/polybar/polybar.git
synced 2026-02-18 18:05:53 +00:00
Make the event loop return shared_ptrs (#2842)
* Return shared_ptr from eventloop * Add -Wdeprecated-copy-dtor warning Produces a warning if classes don't have explicit copy operations if they have a user-defined constructor. This helps us stick to the rule of 5 (kinda, no warnings for missing move operators). * Clean up eventloop * Fix compiler warnings * Fix fs_event_handle_t name
This commit is contained in:
@ -262,11 +262,11 @@ int run(int argc, char** argv) {
|
||||
*/
|
||||
int idx = decoders.size() - 1;
|
||||
|
||||
auto& conn = loop.handle<PipeHandle>();
|
||||
conn.connect(
|
||||
auto conn = loop.handle<PipeHandle>();
|
||||
conn->connect(
|
||||
channel,
|
||||
[&conn, &decoders, pid, type, payload, channel, idx]() {
|
||||
on_connection(conn, decoders[idx], pid, type, payload);
|
||||
on_connection(*conn, decoders[idx], pid, type, payload);
|
||||
},
|
||||
[&](const auto& e) {
|
||||
fprintf(stderr, "%s: Failed to connect to '%s' (err: '%s')\n", exec, channel.c_str(), uv_strerror(e.status));
|
||||
|
||||
Reference in New Issue
Block a user