From 4a51b3382cece833ffd3b159d436474d4da16b87 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 22 Sep 2019 16:44:34 -0700 Subject: [PATCH] ircd::ctx: Move the internal ctx struct ctor out of class. --- ircd/ctx.cc | 14 +++++++++++++- ircd/ctx.h | 8 +------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ircd/ctx.cc b/ircd/ctx.cc index 012ff057c..21944d5b9 100644 --- a/ircd/ctx.cc +++ b/ircd/ctx.cc @@ -57,7 +57,19 @@ ircd::ctx::ctx::ios_desc "ircd::ctx::ctx" }; -// linkage for dtor +/// Internal context struct ctor +ircd::ctx::ctx::ctx(const string_view &name, + const size_t &stack_max, + const context::flags &flags, + boost::asio::io_service &ios) +:name{name} +,flags{flags} +,strand{ios} +,alarm{ios} +,stack{stack_max} +{ +} + ircd::ctx::ctx::~ctx() noexcept { diff --git a/ircd/ctx.h b/ircd/ctx.h index a58fe63bd..33ab53b94 100644 --- a/ircd/ctx.h +++ b/ircd/ctx.h @@ -81,13 +81,7 @@ struct ircd::ctx::ctx ctx(const string_view &name = ""_sv, const size_t &stack_max = DEFAULT_STACK_SIZE, const context::flags &flags = (context::flags)0U, - boost::asio::io_service &ios = ircd::ios::get()) - :name{name} - ,flags{flags} - ,strand{ios} - ,alarm{ios} - ,stack{stack_max} - {} + boost::asio::io_service &ios = ircd::ios::get()); ctx(ctx &&) = delete; ctx(const ctx &) = delete;