Skip to content

Commit

Permalink
Merge pull request #118 from ashtum/covered_switch
Browse files Browse the repository at this point in the history
Fix Wcovered-switch-default warning
  • Loading branch information
pdimov committed Nov 24, 2023
2 parents 30319d6 + e7c4005 commit a4aee6f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ namespace boost { namespace property_tree {
return *stack.back().t;
}
case object:
default:
BOOST_ASSERT(false); // must start with string, i.e. call new_value
case key: {
l.t->push_back(std::make_pair(key_buffer, Ptree()));
Expand All @@ -130,6 +129,8 @@ namespace boost { namespace property_tree {
stack.pop_back();
return new_tree();
}
BOOST_ASSERT(false);
BOOST_UNREACHABLE_RETURN(root);
}
string& new_value() {
if (stack.empty()) return new_tree().data();
Expand Down

0 comments on commit a4aee6f

Please sign in to comment.