diff options
-rw-r--r-- | src/filters.cc | 4 | ||||
-rw-r--r-- | src/format.cc | 4 | ||||
-rw-r--r-- | src/query.h | 1 | ||||
-rw-r--r-- | src/times.cc | 9 | ||||
-rw-r--r-- | src/times.h | 7 | ||||
-rw-r--r-- | src/token.cc | 4 | ||||
-rw-r--r-- | src/value.cc | 20 |
7 files changed, 1 insertions, 48 deletions
diff --git a/src/filters.cc b/src/filters.cc index e0c07bf3..32f42cf4 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -1080,10 +1080,6 @@ void transfer_details::operator()(post_t& post) case SET_PAYEE: xact.payee = substitute.to_string(); break; - - default: - assert(false); - break; } } diff --git a/src/format.cc b/src/format.cc index 93ce4ed4..4fd9700a 100644 --- a/src/format.cc +++ b/src/format.cc @@ -373,10 +373,6 @@ string format_t::real_calc(scope_t& scope) } break; } - - default: - assert(false); - break; } if (elem->max_width > 0 || elem->min_width > 0) { diff --git a/src/query.h b/src/query.h index e77e64ab..8f7917b2 100644 --- a/src/query.h +++ b/src/query.h @@ -185,7 +185,6 @@ public: return "<TERM>"; case UNKNOWN: - default: assert(false); return "<UNKNOWN>"; } diff --git a/src/times.cc b/src/times.cc index 4b627c75..0384edf6 100644 --- a/src/times.cc +++ b/src/times.cc @@ -544,9 +544,6 @@ class date_parser_t case TOK_WEEKS: return "weeks"; case TOK_DAYS: return "days"; case END_REACHED: return "<EOF>"; - default: - assert(false); - return empty_string; } return out.str(); @@ -593,9 +590,6 @@ class date_parser_t case TOK_WEEKS: out << "TOK_WEEKS"; break; case TOK_DAYS: out << "TOK_DAYS"; break; case END_REACHED: out << "END_REACHED"; break; - default: - assert(false); - break; } } @@ -1254,9 +1248,6 @@ date_t date_duration_t::find_nearest(const date_t& date, skip_quantum_t skip) case date_duration_t::DAYS: result = date; break; - default: - assert(false); - break; } return result; } diff --git a/src/times.h b/src/times.h index fed47ae3..39945824 100644 --- a/src/times.h +++ b/src/times.h @@ -217,8 +217,6 @@ struct date_duration_t return date + gregorian::months(length * 3); case YEARS: return date + gregorian::years(length); - default: - assert(false); return date_t(); } } @@ -234,8 +232,6 @@ struct date_duration_t return date - gregorian::months(length * 3); case YEARS: return date - gregorian::years(length); - default: - assert(false); return date_t(); } } @@ -250,9 +246,6 @@ struct date_duration_t case MONTHS: out << "month"; break; case QUARTERS: out << "quarter"; break; case YEARS: out << "year"; break; - default: - assert(false); - break; } if (length > 1) diff --git a/src/token.cc b/src/token.cc index fe7ce7cd..77092d49 100644 --- a/src/token.cc +++ b/src/token.cc @@ -580,10 +580,6 @@ std::ostream& operator<<(std::ostream& out, const expr_t::token_t::kind_t& kind) case expr_t::token_t::TOK_EOF: out << "<end of input>"; break; case expr_t::token_t::UNKNOWN: out << "<unknown>"; break; - - default: - assert(false); - break; } return out; 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; } |