From 34ee358f5e16d4018adf3db5dac31d2d9c16b9f5 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 5 Nov 2009 02:26:06 -0500 Subject: Moved journal reading code into journal_t --- src/global.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/global.h') diff --git a/src/global.h b/src/global.h index 34577656..31a0a480 100644 --- a/src/global.h +++ b/src/global.h @@ -75,10 +75,14 @@ public: void push_report() { report_stack.push_front(new report_t(report_stack.front())); + scope_t::default_scope = &report(); } void pop_report() { - if (! report_stack.empty()) - report_stack.pop_front(); + assert(! report_stack.empty()); + report_stack.pop_front(); + // There should always be the "default report" waiting on the stack. + assert(! report_stack.empty()); + scope_t::default_scope = &report(); } void report_error(const std::exception& err); -- cgit v1.2.3