From 2bbcffc2f319552200b5686d9c33dbee9d8cf313 Mon Sep 17 00:00:00 2001 From: Paolo Monteverde Date: Fri, 11 Nov 2016 15:45:13 +0100 Subject: [PATCH] insert callbacks to the back, so that will be invoked in the proper order --- src/uvw/emitter.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uvw/emitter.hpp b/src/uvw/emitter.hpp index a0a28640..ce04e01a 100644 --- a/src/uvw/emitter.hpp +++ b/src/uvw/emitter.hpp @@ -46,11 +46,11 @@ class Emitter { } Connection once(Listener f) { - return { onceL, onceL.insert(onceL.cbegin(), std::move(f)) }; + return { onceL, onceL.insert(onceL.cend(), std::move(f)) }; } Connection on(Listener f) { - return { onL, onL.insert(onL.cbegin(), std::move(f)) }; + return { onL, onL.insert(onL.cend(), std::move(f)) }; } void erase(Connection conn) noexcept {