mirror of
https://github.com/openharmony/third_party_spirv-tools.git
synced 2026-07-21 03:35:25 -04:00
Avoid implicit fallthrough, by duplicating code (#4556)
The cleverness is probably not worth it.
This commit is contained in:
@@ -120,7 +120,8 @@ spv_result_t getWord(spv_text text, spv_position position, std::string* word) {
|
||||
case '\n':
|
||||
case '\r':
|
||||
if (escaping || quoting) break;
|
||||
// Fall through.
|
||||
word->assign(text->str + start_index, text->str + position->index);
|
||||
return SPV_SUCCESS;
|
||||
case '\0': { // NOTE: End of word found!
|
||||
word->assign(text->str + start_index, text->str + position->index);
|
||||
return SPV_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user