diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-03 13:28:55 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-08 16:36:47 -0700 |
commit | 030234c7a6c7f6c5a901dab68591c9cfb2d4828f (patch) | |
tree | 669e831aecdd9cd74173cb93088b13979887e81e /include/mbgl/util/run_loop.hpp | |
parent | e4995e8d3a38dfd2ed64337e712ecf701af37454 (diff) | |
download | qtlocation-mapboxgl-030234c7a6c7f6c5a901dab68591c9cfb2d4828f.tar.gz |
[core] Rework invokeWithCallback so that the callback is last
Diffstat (limited to 'include/mbgl/util/run_loop.hpp')
-rw-r--r-- | include/mbgl/util/run_loop.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/mbgl/util/run_loop.hpp b/include/mbgl/util/run_loop.hpp index af1053dfdc..6559b72ef8 100644 --- a/include/mbgl/util/run_loop.hpp +++ b/include/mbgl/util/run_loop.hpp @@ -61,10 +61,10 @@ public: } // Invoke fn(args...) on this RunLoop, then invoke callback(results...) on the current RunLoop. - template <class Fn, class Cb, class... Args> + template <class Fn, class... Args> std::unique_ptr<AsyncRequest> - invokeWithCallback(Fn&& fn, Cb&& callback, Args&&... args) { - std::shared_ptr<WorkTask> task = WorkTask::makeWithCallback(std::forward<Fn>(fn), std::forward<Cb>(callback), std::forward<Args>(args)...); + invokeWithCallback(Fn&& fn, Args&&... args) { + std::shared_ptr<WorkTask> task = WorkTask::makeWithCallback(std::forward<Fn>(fn), std::forward<Args>(args)...); push(task); return std::make_unique<WorkRequest>(task); } |