summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2017-08-07 17:21:35 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2017-08-07 18:48:42 +0300
commit2dd8ec885453b6c75d982dd90722e583b2da3525 (patch)
tree4ae9b61aa42da54f08d188773b31be820d1ae565
parentd49c4cd61c0d5b29bf21c029e4a3201563de1671 (diff)
downloadqtlocation-mapboxgl-2dd8ec885453b6c75d982dd90722e583b2da3525.tar.gz
[core] Removed unused constructorupstream/tvn-test-ci-time-out
Not in use at the moment, was causing a compiler error on Apple LLVM version 8.0.0 (clang-800.0.42.1). ``` src/mbgl/sprite/sprite_loader.cpp:25:11: error: call to constructor of 'Actor<mbgl::SpriteLoaderWorker>' is ambiguous ```
-rw-r--r--include/mbgl/actor/actor.hpp8
-rw-r--r--test/actor/actor.test.cpp31
2 files changed, 0 insertions, 39 deletions
diff --git a/include/mbgl/actor/actor.hpp b/include/mbgl/actor/actor.hpp
index 74d5a66285..6610421eb5 100644
--- a/include/mbgl/actor/actor.hpp
+++ b/include/mbgl/actor/actor.hpp
@@ -57,14 +57,6 @@ public:
object(self(), std::forward<Args>(args_)...) {
}
- // Enabled for plain Objects
- template <typename U = Object, class... Args,
- typename std::enable_if<!std::is_constructible<U, ActorRef<Object>, Args...>::value>::type...>
- Actor(Scheduler& scheduler, Args&&... args_)
- : mailbox(std::make_shared<Mailbox>(scheduler)),
- object(std::forward<Args>(args_)...) {
- }
-
~Actor() {
mailbox->close();
}
diff --git a/test/actor/actor.test.cpp b/test/actor/actor.test.cpp
index 39d7ff81f4..2b4c83f566 100644
--- a/test/actor/actor.test.cpp
+++ b/test/actor/actor.test.cpp
@@ -305,34 +305,3 @@ TEST(Actor, Ask) {
ASSERT_EQ(std::future_status::ready, status);
ASSERT_EQ(2, result.get());
}
-
-TEST(Actor, NoSelfActorRef) {
- // Not all actors need a reference to self
-
- // Trivially constructable
- struct Trivial {};
-
- ThreadPool pool { 2 };
- Actor<Trivial> trivial(pool);
-
-
- // With arguments
- struct WithArguments {
- std::promise<void> promise;
-
- WithArguments(std::promise<void> promise_)
- : promise(std::move(promise_)) {
- }
-
- void receive() {
- promise.set_value();
- }
- };
-
- std::promise<void> promise;
- auto future = promise.get_future();
- Actor<WithArguments> withArguments(pool, std::move(promise));
-
- withArguments.invoke(&WithArguments::receive);
- future.wait();
-}