[clang-tidy] do not use return after else (#892)

Found with readability-else-after-return

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-06-15 13:09:29 -07:00
committed by GitHub
parent 4dbfeb0bbc
commit a808c1f44a
5 changed files with 22 additions and 22 deletions

View File

@@ -94,15 +94,13 @@ EmitterNodeType::value EmitterState::NextGroupType(
if (type == GroupType::Seq) {
if (GetFlowType(type) == Block)
return EmitterNodeType::BlockSeq;
else
return EmitterNodeType::FlowSeq;
} else {
if (GetFlowType(type) == Block)
return EmitterNodeType::BlockMap;
else
return EmitterNodeType::FlowMap;
return EmitterNodeType::FlowSeq;
}
if (GetFlowType(type) == Block)
return EmitterNodeType::BlockMap;
return EmitterNodeType::FlowMap;
// can't happen
assert(false);
return EmitterNodeType::NoType;
@@ -156,9 +154,8 @@ void EmitterState::EndedGroup(GroupType::value type) {
if (m_groups.empty()) {
if (type == GroupType::Seq) {
return SetError(ErrorMsg::UNEXPECTED_END_SEQ);
} else {
return SetError(ErrorMsg::UNEXPECTED_END_MAP);
}
return SetError(ErrorMsg::UNEXPECTED_END_MAP);
}
// get rid of the current group