aboutsummaryrefslogtreecommitdiff
path: root/brep
diff options
context:
space:
mode:
Diffstat (limited to 'brep')
-rw-r--r--brep/diagnostics16
-rw-r--r--brep/module.cxx4
2 files changed, 6 insertions, 14 deletions
diff --git a/brep/diagnostics b/brep/diagnostics
index eda35cc..70ddb2a 100644
--- a/brep/diagnostics
+++ b/brep/diagnostics
@@ -95,27 +95,19 @@ namespace brep
diag_record (diag_record&& r)
: data_ (std::move (r.data_)), os_ (std::move (r.os_))
{
- empty_ = r.empty_;
- r.empty_ = true;
-
epilogue_ = r.epilogue_;
- r.epilogue_ = nullptr;
+ r.data_.clear (); // Empty.
}
*/
diag_record (diag_record&& r)
: data_ (std::move (r.data_))
{
- empty_ = r.empty_;
- epilogue_ = r.epilogue_;
-
- if (!empty_)
- {
+ if (!data_.empty ())
os_ << r.os_.str ();
- r.empty_ = true;
- r.epilogue_ = nullptr;
- }
+ epilogue_ = r.epilogue_;
+ r.data_.clear (); // Empty.
}
diag_record& operator= (diag_record&&) = delete;
diff --git a/brep/module.cxx b/brep/module.cxx
index fb33e1e..3420aa0 100644
--- a/brep/module.cxx
+++ b/brep/module.cxx
@@ -30,7 +30,7 @@ namespace brep
{
// @@ Both log and return as 505.
//
- write (move (e.data));
+ log_write (move (e.data));
}
catch (const exception& e)
{
@@ -47,7 +47,7 @@ namespace brep
}
module::
- module (): log_writer_ (bind (&module::write, this, _1)) {}
+ module (): log_writer_ (bind (&module::log_write, this, _1)) {}
void module::
log_write (diag_data&& d) const