diff options
Diffstat (limited to 'src/serialise.cpp')
-rw-r--r-- | src/serialise.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/serialise.cpp b/src/serialise.cpp index 88b323f9..e7d94948 100644 --- a/src/serialise.cpp +++ b/src/serialise.cpp @@ -79,6 +79,12 @@ Serialiser& Serialiser_TextTree::operator<<(uint64_t val) m_os << val << "\n"; return *this; } +Serialiser& Serialiser_TextTree::operator<<(double val) +{ + print_indent(); + m_os << val << "\n"; + return *this; +} Serialiser& Serialiser_TextTree::operator<<(const char* s) { @@ -188,6 +194,13 @@ void Deserialiser_TextTree::item(uint64_t& v) if( !m_is.good() ) throw ::std::runtime_error("TODO: Less shit exception, item(uint64_t)"); } +void Deserialiser_TextTree::item(double& v) +{ + eat_ws(); + m_is >> v; + if( !m_is.good() ) + throw ::std::runtime_error("TODO: Less shit exception, item(double)"); +} void Deserialiser_TextTree::item(::std::string& s) { eat_ws(); |