From 605819b539cb3dc296ac93693e2c922b8a92db49 Mon Sep 17 00:00:00 2001 From: Joshua Scott Date: Fri, 30 Mar 2018 21:13:23 +0100 Subject: [PATCH] dml: Don't serialize/deserialize NOXFER fields --- src/dml/Record.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/dml/Record.cpp b/src/dml/Record.cpp index a5a9771..28085ff 100644 --- a/src/dml/Record.cpp +++ b/src/dml/Record.cpp @@ -47,20 +47,29 @@ namespace dml void Record::write_to(std::ostream &ostream) const { for (auto it = m_fields.begin(); it != m_fields.end(); ++it) - (*it)->write_to(ostream); + { + if ((*it)->is_transferable()) + (*it)->write_to(ostream); + } } void Record::read_from(std::istream &istream) { for (auto it = m_fields.begin(); it != m_fields.end(); ++it) - (*it)->read_from(istream); + { + if ((*it)->is_transferable()) + (*it)->read_from(istream); + } } size_t Record::get_size() const { size_t size = 0; for (auto it = m_fields.begin(); it != m_fields.end(); ++it) - size += (*it)->get_size(); + { + if ((*it)->is_transferable()) + size += (*it)->get_size(); + } return size; }