Silence errors about SECRET_BASE_GROUP
This commit is contained in:
parent
856624addf
commit
7777eac9f4
1 changed files with 6 additions and 1 deletions
|
@ -2218,10 +2218,15 @@ bool Project::readSecretBaseIds() {
|
|||
if (!projectConfig.getEventSecretBaseEnabled())
|
||||
return true;
|
||||
|
||||
// SECRET_BASE_GROUP is a function-like macro, which Porymap can't handle.
|
||||
// Redefine it so Porymap won't produce spurious errors about failing to parse it.
|
||||
QMap<QString, int> knownDefines = QMap<QString, int>();
|
||||
knownDefines.insert("SECRET_BASE_GROUP", 0);
|
||||
|
||||
QStringList prefixes("\\bSECRET_BASE_[A-Za-z0-9_]*_[0-9]+");
|
||||
QString filename = "include/constants/secret_bases.h";
|
||||
fileWatcher.addPath(root + "/" + filename);
|
||||
secretBaseIds = parser.readCDefinesSorted(filename, prefixes);
|
||||
secretBaseIds = parser.readCDefinesSorted(filename, prefixes, knownDefines);
|
||||
if (secretBaseIds.isEmpty()) {
|
||||
logError(QString("Failed to read secret base id constants from %1").arg(filename));
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue