From 2dd8ec885453b6c75d982dd90722e583b2da3525 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Mon, 7 Aug 2017 17:21:35 +0300 Subject: [core] Removed unused constructor 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' is ambiguous ``` --- include/mbgl/actor/actor.hpp | 8 -------- test/actor/actor.test.cpp | 31 ------------------------------- 2 files changed, 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_)...) { } - // Enabled for plain Objects - template , Args...>::value>::type...> - Actor(Scheduler& scheduler, Args&&... args_) - : mailbox(std::make_shared(scheduler)), - object(std::forward(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(pool); - - - // With arguments - struct WithArguments { - std::promise promise; - - WithArguments(std::promise promise_) - : promise(std::move(promise_)) { - } - - void receive() { - promise.set_value(); - } - }; - - std::promise promise; - auto future = promise.get_future(); - Actor withArguments(pool, std::move(promise)); - - withArguments.invoke(&WithArguments::receive); - future.wait(); -} -- cgit v1.2.1