Permalink
Browse files

add assert

  • Loading branch information...
jpihl committed Mar 27, 2017
1 parent 481aaac commit a5772440f13a04a75a4eccc2c06d6b76809438d6
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/bourne/json.cpp
View
@@ -288,9 +288,14 @@ double json::to_float() const
{
assert(is_float());
if (m_type == class_type::floating)
{
return m_internal.m_float;
else if (m_type == class_type::integral)
}
else
{
assert(m_type == class_type::integral);
return (double) m_internal.m_int;
}
}
std::string json::to_string() const

0 comments on commit a577244

Please sign in to comment.