mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-08-03 12:50:02 +00:00
Pass the ResponseFactory object down to the Response itself.
This commit is contained in:
parent
10da75caf5
commit
3bc6c56c03
12 changed files with 38 additions and 11 deletions
|
@ -54,8 +54,14 @@ namespace {
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
std::unique_ptr<tawashi::Response> make_response (const Kakoune::SafePtr<tawashi::SettingsBag>& parSettings, const Kakoune::SafePtr<tawashi::cgi::Env>& parCgiEnv) {
|
||||
return static_cast<std::unique_ptr<tawashi::Response>>(std::make_unique<T>(parSettings, &std::cout, parCgiEnv));
|
||||
std::unique_ptr<tawashi::Response> make_response (
|
||||
const Kakoune::SafePtr<tawashi::ResponseFactory>& parFactory,
|
||||
const Kakoune::SafePtr<tawashi::SettingsBag>& parSettings,
|
||||
const Kakoune::SafePtr<tawashi::cgi::Env>& parCgiEnv
|
||||
) {
|
||||
return static_cast<std::unique_ptr<tawashi::Response>>(
|
||||
std::make_unique<T>(parFactory, parSettings, &std::cout, parCgiEnv)
|
||||
);
|
||||
}
|
||||
|
||||
void fill_defaults (tawashi::SettingsBag& parSettings) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue