mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-20 13:09:40 +00:00
improved one-shot filter handling; allow empty pre-defined filters
This commit is contained in:
parent
aa935ff03d
commit
2e9948e86a
1 changed files with 6 additions and 3 deletions
|
@ -47,7 +47,7 @@ namespace CSMFilter
|
|||
std::string mString;
|
||||
double mNumber;
|
||||
|
||||
Token (Type type);
|
||||
Token (Type type = Type_None);
|
||||
|
||||
Token (const std::string& string);
|
||||
|
||||
|
@ -521,9 +521,12 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined)
|
|||
mInput = filter;
|
||||
mIndex = 0;
|
||||
|
||||
Token token = getNextToken();
|
||||
Token token;
|
||||
|
||||
if (token==Token (Token::Type_OneShot))
|
||||
if (allowPredefined)
|
||||
token = getNextToken();
|
||||
|
||||
if (!allowPredefined || token==Token (Token::Type_OneShot))
|
||||
{
|
||||
boost::shared_ptr<Node> node = parseImp (true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue