Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Wcovered-switch-default warning #118

Merged
merged 3 commits into from
Nov 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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