From 644f1639a5204ebc854c369f3f29a02cd766196b Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sun, 5 Jan 2020 17:22:18 +0100 Subject: [PATCH] Boost 1.59 is required nowadays, remove support for older versions. --- src/kernel/context/ContextBoost.cpp | 17 +---------------- src/kernel/context/ContextBoost.hpp | 6 +----- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/kernel/context/ContextBoost.cpp b/src/kernel/context/ContextBoost.cpp index 690ab05c06..71274dbadd 100644 --- a/src/kernel/context/ContextBoost.cpp +++ b/src/kernel/context/ContextBoost.cpp @@ -40,22 +40,9 @@ BoostContext::BoostContext(std::function&& code, actor::ActorImpl* actor #else this->fc_ = boost::context::detail::make_fcontext(stack, smx_context_stack_size, BoostContext::wrapper); #endif - - } else { -#if BOOST_VERSION < 105600 - this->fc_ = new boost::context::fcontext_t(); -#endif } } -BoostContext::~BoostContext() -{ -#if BOOST_VERSION < 105600 - if (not get_stack()) - delete this->fc_; -#endif -} - void BoostContext::wrapper(BoostContext::arg_type arg) { #if BOOST_VERSION < 106100 @@ -82,9 +69,7 @@ void BoostContext::wrapper(BoostContext::arg_type arg) void BoostContext::swap_into(SwappedContext* to_) { BoostContext* to = static_cast(to_); -#if BOOST_VERSION < 105600 - boost::context::jump_fcontext(this->fc_, to->fc_, reinterpret_cast(to)); -#elif BOOST_VERSION < 106100 +#if BOOST_VERSION < 106100 boost::context::jump_fcontext(&this->fc_, to->fc_, reinterpret_cast(to)); #else BoostContext* ctx[2] = {this, to}; diff --git a/src/kernel/context/ContextBoost.hpp b/src/kernel/context/ContextBoost.hpp index 516b85fda1..687a3c18be 100644 --- a/src/kernel/context/ContextBoost.hpp +++ b/src/kernel/context/ContextBoost.hpp @@ -33,15 +33,11 @@ namespace context { class BoostContext : public SwappedContext { public: BoostContext(std::function&& code, actor::ActorImpl* actor, SwappedContextFactory* factory); - ~BoostContext() override; void swap_into(SwappedContext* to) override; private: -#if BOOST_VERSION < 105600 - boost::context::fcontext_t* fc_ = nullptr; - typedef intptr_t arg_type; -#elif BOOST_VERSION < 106100 +#if BOOST_VERSION < 106100 boost::context::fcontext_t fc_; typedef intptr_t arg_type; #else -- 2.20.1