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 --- ixslt.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ixslt.cc') diff --git a/ixslt.cc b/ixslt.cc index 683effd..6932dec 100644 --- a/ixslt.cc +++ b/ixslt.cc @@ -42,8 +42,10 @@ class StreamInputSource { const boost::filesystem::path& actualPath, const boost::filesystem::path& contextPath ): - file_(actualPath), - source_(file_) { + file_(std::make_unique( + actualPath + )), + source_(*file_) { this->source_.setSystemId( *InputXSLT::XercesStringGuard( "file://" + contextPath.string() @@ -56,7 +58,7 @@ class StreamInputSource { } private: - boost::filesystem::ifstream file_; + std::unique_ptr file_; xalan::XSLTInputSource source_; }; -- cgit v1.2.3