summaryrefslogtreecommitdiff
path: root/include/mbgl/actor/scheduler.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/actor/scheduler.hpp')
-rw-r--r--include/mbgl/actor/scheduler.hpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/include/mbgl/actor/scheduler.hpp b/include/mbgl/actor/scheduler.hpp
index d7fec41ea6..dca6b132f4 100644
--- a/include/mbgl/actor/scheduler.hpp
+++ b/include/mbgl/actor/scheduler.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include <mbgl/util/pass_types.hpp>
+
#include <mapbox/weak.hpp>
#include <functional>
@@ -9,23 +11,6 @@ namespace mbgl {
class Mailbox;
-// Using this type as a return type enforces the client to retain the returned object.
-// TODO: Move to a separate file if/when other clients for this aux API turn up.
-template <typename T>
-class Pass {
-public:
- Pass(T&& obj_) : obj(std::forward<T>(obj_)) {}
- Pass(Pass&&) = default;
- Pass(const Pass&) = delete;
- operator T() && { return std::move(obj); }
-
-private:
- T obj;
-};
-
-template <typename T>
-using PassRefPtr = Pass<std::shared_ptr<T>>;
-
/*
A `Scheduler` is responsible for coordinating the processing of messages by
one or more actors via their mailboxes. It's an abstract interface. Currently,