[janitor] Move lambda to prevent warning.
Fixes the warning introduced by #3605
This commit is contained in:
@@ -1577,17 +1577,6 @@ std::vector<std::string> Parser::getAllDeckNames () const {
|
||||
std::string curSectionName = deck[0].name();
|
||||
size_t curKwIdx = 1;
|
||||
for (; curKwIdx < deck.size(); ++curKwIdx) {
|
||||
const auto& curKeyword = deck[curKwIdx];
|
||||
const std::string& curKeywordName = curKeyword.name();
|
||||
|
||||
if (!isSectionDelimiter( curKeyword )) {
|
||||
if( !parser.isRecognizedKeyword( curKeywordName ) )
|
||||
// ignore unknown keywords for now (i.e. they can appear in any section)
|
||||
continue;
|
||||
|
||||
const bool isOperateKeyword =
|
||||
Fieldprops::keywords::is_oper_keyword(curKeywordName);
|
||||
|
||||
auto checker = [&errorGuard, &deckValid, &parser, curSectionName,
|
||||
ensureKeywordSectionAffiliation, errorKey]
|
||||
(const std::string& curKeywordName, const KeywordLocation& location)
|
||||
@@ -1607,6 +1596,17 @@ std::vector<std::string> Parser::getAllDeckNames () const {
|
||||
}
|
||||
};
|
||||
|
||||
const auto& curKeyword = deck[curKwIdx];
|
||||
const std::string& curKeywordName = curKeyword.name();
|
||||
|
||||
if (!isSectionDelimiter( curKeyword )) {
|
||||
if( !parser.isRecognizedKeyword( curKeywordName ) )
|
||||
// ignore unknown keywords for now (i.e. they can appear in any section)
|
||||
continue;
|
||||
|
||||
const bool isOperateKeyword =
|
||||
Fieldprops::keywords::is_oper_keyword(curKeywordName);
|
||||
|
||||
if (isOperateKeyword) {
|
||||
for (const auto& record : curKeyword) {
|
||||
const auto& operName = record.getItem(0).getTrimmedString(0);
|
||||
|
||||
Reference in New Issue
Block a user