From 805c8b26f7261cbd6ce8f946b0911c3339114adf Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Mon, 13 Jul 2015 19:54:40 +0300 Subject: Do not return a value on a "[]() -> void" This is an undefined behavior, and it is a mystery why the compiler was not complaining about it. --- src/mbgl/util/thread.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mbgl/util/thread.hpp') diff --git a/src/mbgl/util/thread.hpp b/src/mbgl/util/thread.hpp index b6eb48dfb6..a0c39abad0 100644 --- a/src/mbgl/util/thread.hpp +++ b/src/mbgl/util/thread.hpp @@ -57,7 +57,7 @@ public: std::packaged_task task(std::bind(fn, object, args...)); std::future future = task.get_future(); loop->invoke(std::move(task)); - return future.get(); + future.get(); } private: -- cgit v1.2.1