From 2dd9d92e340d0ed7b0203ef9e0eec7356db82590 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Wed, 16 Apr 2014 17:06:11 +0200 Subject: [PATCH] Fix dumping function to make them use generic ostream * src/abg-writer.cc (dump(const decl_base_sptr, std::ostream&)): Do not dump the content to cerr here. Rather dump to the output stream given in parameter. Oops. (dump(const translation_unit&, std::ostream&)): Likewise. Signed-off-by: Dodji Seketeli --- src/abg-writer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/abg-writer.cc b/src/abg-writer.cc index 9aaf1e4e..e4395871 100644 --- a/src/abg-writer.cc +++ b/src/abg-writer.cc @@ -2131,7 +2131,7 @@ dump(const decl_base_sptr d, std::ostream& o) { xml_writer::write_context ctxt(o); write_decl(d, ctxt, /*indent=*/0); - cerr << "\n"; + o << "\n"; } /// Serialize a pointer to decl_base to stderr. @@ -2187,7 +2187,7 @@ dump(const translation_unit& t, std::ostream& o) { xml_writer::write_context ctxt(o); write_translation_unit(t, ctxt, /*indent=*/0); - cerr << "\n"; + o << "\n"; } /// Serialize an instance of @ref translation_unit to stderr.