Skip to content

Commit

Permalink
add assert
Browse files Browse the repository at this point in the history
  • Loading branch information
jpihl committed Mar 27, 2017
1 parent 481aaac commit a577244
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bourne/json.cpp
Expand Up @@ -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
Expand Down

0 comments on commit a577244

Please sign in to comment.