diff options
author | John Wiegley <johnw@newartisans.com> | 2012-02-17 15:15:32 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-02-17 15:15:32 -0600 |
commit | a19b541dd9eac565a2944dfc8dfadb185742ddf6 (patch) | |
tree | bcf2aceac0aa77e01f8661e96ec72b4145c767f9 /src/value.cc | |
parent | 7dc1d8c169d8d73020afc91076c07cf6897866f2 (diff) | |
download | fork-ledger-a19b541dd9eac565a2944dfc8dfadb185742ddf6.tar.gz fork-ledger-a19b541dd9eac565a2944dfc8dfadb185742ddf6.tar.bz2 fork-ledger-a19b541dd9eac565a2944dfc8dfadb185742ddf6.zip |
Removed unneeded default cases
Diffstat (limited to 'src/value.cc')
-rw-r--r-- | src/value.cc | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/value.cc b/src/value.cc index b306581d..c62e6f32 100644 --- a/src/value.cc +++ b/src/value.cc @@ -118,8 +118,6 @@ value_t::operator bool() const return as_scope() != NULL; case ANY: return ! as_any().empty(); - default: - break; } add_error_context(_("While taking boolean value of %1:") << *this); @@ -1668,11 +1666,8 @@ value_t value_t::strip_annotations(const keep_details_t& what_to_keep) const return as_amount().strip_annotations(what_to_keep); case BALANCE: return as_balance().strip_annotations(what_to_keep); - - default: - assert(false); - break; } + assert(false); return NULL_VALUE; } @@ -1707,10 +1702,6 @@ string value_t::label(optional<type_t> the_type) const return _("an expr"); else return _("an object"); - break; - default: - assert(false); - break; } assert(false); return _("<invalid>"); @@ -1813,10 +1804,6 @@ void value_t::print(std::ostream& _out, out << "<#OBJECT>"; } break; - - default: - add_error_context(_("While printing %1:") << *this); - throw_(value_error, _("Cannot print %1") << label()); } _out << out.str(); @@ -1905,10 +1892,6 @@ void value_t::dump(std::ostream& out, const bool relaxed) const out << ')'; break; } - - default: - assert(false); - break; } } @@ -2003,7 +1986,6 @@ void to_xml(std::ostream& out, const value_t& value) case value_t::SCOPE: case value_t::ANY: - default: assert(false); break; } |