aboutsummaryrefslogtreecommitdiff
path: root/src/support/error/warning_capacitor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/error/warning_capacitor.cc')
-rw-r--r--src/support/error/warning_capacitor.cc10
1 files changed, 6 insertions, 4 deletions
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<warning_cache>()) { }
auto WarningCapacitor::discharge() -> warning_cache_ptr {
- warning_cache_ptr tmp(std::move(this->warning_cache_));
+ warning_cache_ptr tmp(
+ std::make_unique<warning_cache>()
+ );
- this->warning_cache_.reset(new warning_cache());
+ std::swap(tmp, this->warning_cache_);
- return std::move(tmp);
+ return tmp;
}
void WarningCapacitor::receive(