mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
Use RANGE macro to abbreviate begin/end pairs (#1269)
This commit is contained in:
@@ -281,17 +281,13 @@ try_again: // Can't use a `do {} while(0)` loop, otherwise compilers (wrongly) t
|
||||
}
|
||||
|
||||
for (SectionType type : EnumSeq(SECTTYPE_INVALID)) {
|
||||
if (std::equal(ident.begin(), ident.end(),
|
||||
sectionTypeInfo[type].name.begin(), sectionTypeInfo[type].name.end(),
|
||||
strUpperCmp)) {
|
||||
if (std::equal(RANGE(ident), RANGE(sectionTypeInfo[type].name), strUpperCmp)) {
|
||||
return yy::parser::make_section_type(type);
|
||||
}
|
||||
}
|
||||
|
||||
for (Keyword const &keyword : keywords) {
|
||||
if (std::equal(ident.begin(), ident.end(),
|
||||
keyword.name.begin(), keyword.name.end(),
|
||||
strUpperCmp)) {
|
||||
if (std::equal(RANGE(ident), RANGE(keyword.name), strUpperCmp)) {
|
||||
return keyword.tokenGen();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user