Added break statements to various default: cases
No behavioral changes, just stylistic. Change-Id: I95a54bb2ee5610272ecea4886163ba79ae2544a2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447837 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
parent
144926d968
commit
b13f36944c
@ -233,6 +233,7 @@ std::unique_ptr<Program> DSLParser::program() {
|
|||||||
default:
|
default:
|
||||||
this->declaration();
|
this->declaration();
|
||||||
done = fEncounteredFatalError;
|
done = fEncounteredFatalError;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
End();
|
End();
|
||||||
@ -1184,6 +1185,7 @@ skstd::optional<DSLBlock> DSLParser::block() {
|
|||||||
return skstd::nullopt;
|
return skstd::nullopt;
|
||||||
}
|
}
|
||||||
statements.push_back(statement->release());
|
statements.push_back(statement->release());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,6 +199,7 @@ void Dehydrator::write(const Symbol& s) {
|
|||||||
this->writeCommand(Rehydrator::kSystemType_Command);
|
this->writeCommand(Rehydrator::kSystemType_Command);
|
||||||
this->writeId(&t);
|
this->writeId(&t);
|
||||||
this->write(t.name());
|
this->write(t.name());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -147,6 +147,7 @@ std::unique_ptr<ASTFile> Parser::compilationUnit() {
|
|||||||
if (decl) {
|
if (decl) {
|
||||||
getNode(result).addChild(decl);
|
getNode(result).addChild(decl);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -787,6 +787,7 @@ void GLSLCodeGenerator::writeVariableReference(const VariableReference& ref) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this->write(ref.variable()->name());
|
this->write(ref.variable()->name());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,6 +305,7 @@ void SPIRVCodeGenerator::writeString(skstd::string_view s, OutputStream& out) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this->writeWord(0, out);
|
this->writeWord(0, out);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,6 +650,7 @@ SpvId SPIRVCodeGenerator::getType(const Type& rawType, const MemoryLayout& layou
|
|||||||
} else {
|
} else {
|
||||||
SkDEBUGFAILF("invalid type: %s", type->description().c_str());
|
SkDEBUGFAILF("invalid type: %s", type->description().c_str());
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
fTypeMap[key] = result;
|
fTypeMap[key] = result;
|
||||||
return result;
|
return result;
|
||||||
@ -1875,6 +1877,7 @@ std::vector<SpvId> SPIRVCodeGenerator::getAccessChain(const Expression& expr, Ou
|
|||||||
SpvId id = this->getLValue(expr, out)->getPointer();
|
SpvId id = this->getLValue(expr, out)->getPointer();
|
||||||
SkASSERT(id != (SpvId) -1);
|
SkASSERT(id != (SpvId) -1);
|
||||||
chain.push_back(id);
|
chain.push_back(id);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chain;
|
return chain;
|
||||||
|
@ -45,7 +45,7 @@ void RegexParser::term() {
|
|||||||
case '(': this->group(); break;
|
case '(': this->group(); break;
|
||||||
case '[': this->set(); break;
|
case '[': this->set(); break;
|
||||||
case '.': this->dot(); break;
|
case '.': this->dot(); break;
|
||||||
default: this->literal();
|
default: this->literal(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,6 +71,7 @@ void RegexParser::sequence() {
|
|||||||
RegexNode right = this->pop();
|
RegexNode right = this->pop();
|
||||||
RegexNode left = this->pop();
|
RegexNode left = this->pop();
|
||||||
fStack.emplace(RegexNode::kConcat_Kind, std::move(left), std::move(right));
|
fStack.emplace(RegexNode::kConcat_Kind, std::move(left), std::move(right));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -152,6 +153,7 @@ void RegexParser::set() {
|
|||||||
exit(1);
|
exit(1);
|
||||||
default:
|
default:
|
||||||
this->setItem();
|
this->setItem();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user