From 7a08fe8181b1cd093ece2e99e9dbc254030c4864 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 16 Feb 2018 16:44:57 -0800 Subject: [PATCH] ircd::m: Deinline these request ctors. --- include/ircd/m/request.h | 56 ---------------------------------------- ircd/m/request.cc | 52 +++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 56 deletions(-) diff --git a/include/ircd/m/request.h b/include/ircd/m/request.h index bf7cb1216..e7e8af69c 100644 --- a/include/ircd/m/request.h +++ b/include/ircd/m/request.h @@ -74,59 +74,3 @@ struct ircd::m::request::x_matrix x_matrix(const string_view &); x_matrix() = default; }; - -inline -ircd::m::request::request(const string_view &method, - const string_view &uri, - const mutable_buffer &body_buf, - const json::members &body) -:request -{ - my_host(), - string_view{}, - method, - uri, - json::stringify(mutable_buffer{body_buf}, body) -} -{} - -inline -ircd::m::request::request(const string_view &method, - const string_view &uri) -:request -{ - my_host(), - string_view{}, - method, - uri, - json::object{} -} -{} - -inline -ircd::m::request::request(const string_view &method, - const string_view &uri, - const json::object &content) -:request -{ - my_host(), - string_view{}, - method, - uri, - content -} -{} - -inline -ircd::m::request::request(const string_view &origin, - const string_view &destination, - const string_view &method, - const string_view &uri, - const json::object &content) -{ - json::get<"origin"_>(*this) = origin; - json::get<"destination"_>(*this) = destination; - json::get<"method"_>(*this) = method; - json::get<"uri"_>(*this) = uri; - json::get<"content"_>(*this) = content; -} diff --git a/ircd/m/request.cc b/ircd/m/request.cc index 524380e24..2f69287b6 100644 --- a/ircd/m/request.cc +++ b/ircd/m/request.cc @@ -14,6 +14,58 @@ // request // +ircd::m::request::request(const string_view &method, + const string_view &uri, + const mutable_buffer &body_buf, + const json::members &body) +:request +{ + my_host(), + string_view{}, + method, + uri, + json::stringify(mutable_buffer{body_buf}, body) +} +{} + +ircd::m::request::request(const string_view &method, + const string_view &uri) +:request +{ + my_host(), + string_view{}, + method, + uri, + json::object{} +} +{} + +ircd::m::request::request(const string_view &method, + const string_view &uri, + const json::object &content) +:request +{ + my_host(), + string_view{}, + method, + uri, + content +} +{} + +ircd::m::request::request(const string_view &origin, + const string_view &destination, + const string_view &method, + const string_view &uri, + const json::object &content) +{ + json::get<"origin"_>(*this) = origin; + json::get<"destination"_>(*this) = destination; + json::get<"method"_>(*this) = method; + json::get<"uri"_>(*this) = uri; + json::get<"content"_>(*this) = content; +} + ircd::string_view ircd::m::request::operator()(const mutable_buffer &out, const vector_view &addl_headers)