From 0cbbbdc846f7efdc47df0639bb1ce72f0e8e79e8 Mon Sep 17 00:00:00 2001 From: couriersud Date: Tue, 28 Jul 2020 20:42:44 +0200 Subject: netlist: source stream refactoring * This is an infrastructure change to enable better error reporting including file/source and line numbers in the future --- src/lib/netlist/plib/ppreprocessor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/netlist/plib/ppreprocessor.cpp') diff --git a/src/lib/netlist/plib/ppreprocessor.cpp b/src/lib/netlist/plib/ppreprocessor.cpp index d183485789f..7e8c363fbd3 100644 --- a/src/lib/netlist/plib/ppreprocessor.cpp +++ b/src/lib/netlist/plib/ppreprocessor.cpp @@ -560,16 +560,16 @@ namespace plib { // first try local context auto l(plib::util::buildpath({m_stack.back().m_local_path, arg})); auto lstrm(m_sources.get_stream(l)); - if (lstrm) + if (!lstrm.empty()) { - m_stack.emplace_back(input_context(std::move(lstrm), plib::util::path(l), l)); + m_stack.emplace_back(input_context(lstrm.release_stream(), plib::util::path(l), l)); } else { auto strm(m_sources.get_stream(arg)); - if (strm) + if (!strm.empty()) { - m_stack.emplace_back(input_context(std::move(strm), plib::util::path(arg), arg)); + m_stack.emplace_back(input_context(strm.release_stream(), plib::util::path(arg), arg)); } else error("include not found:" + arg); -- cgit v1.2.3-70-g09d2