Use operator bool to claw back some readability

This commit is contained in:
Robert Widmann
2019-10-29 16:25:43 -07:00
parent 37e82a6133
commit b849e51768
45 changed files with 120 additions and 156 deletions

View File

@@ -429,8 +429,7 @@ configureGenericDesignatedInitOverride(ASTContext &ctx,
auto lookupConformanceFn =
[&](CanType depTy, Type substTy,
ProtocolDecl *proto) -> ProtocolConformanceRef {
auto conf = subMap.lookupConformance(depTy, proto);
if (!conf.isInvalid())
if (auto conf = subMap.lookupConformance(depTy, proto))
return conf;
return ProtocolConformanceRef(proto);