From 8ebea90f5cee70654ab9f1c19ed4f89dfc8ffb25 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 14 Sep 2014 19:49:15 +0200 Subject: Switched member initialization to std::make_unique * i.e. InputXSLT now requires a C++14 supporting compiler / standard library implementation * this was done while enabling the StreamInputSource to handle all kinds of streams ** this in turn is required to enable e.g. stdin as transformation source while preserving the correct filesystem context --- src/support/error/warning_capacitor.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/support/error/warning_capacitor.cc') diff --git a/src/support/error/warning_capacitor.cc b/src/support/error/warning_capacitor.cc index f8d2b99..0d98977 100644 --- a/src/support/error/warning_capacitor.cc +++ b/src/support/error/warning_capacitor.cc @@ -4,14 +4,16 @@ namespace InputXSLT { WarningCapacitor::WarningCapacitor(ErrorMultiplexer* multiplexer): ErrorMultiplexer::receiver(multiplexer), - warning_cache_(new warning_cache()) { } + warning_cache_(std::make_unique()) { } auto WarningCapacitor::discharge() -> warning_cache_ptr { - warning_cache_ptr tmp(std::move(this->warning_cache_)); + warning_cache_ptr tmp( + std::make_unique() + ); - this->warning_cache_.reset(new warning_cache()); + std::swap(tmp, this->warning_cache_); - return std::move(tmp); + return tmp; } void WarningCapacitor::receive( -- cgit v1.2.3