mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
improved one-shot filter handling; allow empty pre-defined filters
This commit is contained in:
parent
aa935ff03d
commit
2e9948e86a
@ -47,7 +47,7 @@ namespace CSMFilter
|
|||||||
std::string mString;
|
std::string mString;
|
||||||
double mNumber;
|
double mNumber;
|
||||||
|
|
||||||
Token (Type type);
|
Token (Type type = Type_None);
|
||||||
|
|
||||||
Token (const std::string& string);
|
Token (const std::string& string);
|
||||||
|
|
||||||
@ -521,9 +521,12 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined)
|
|||||||
mInput = filter;
|
mInput = filter;
|
||||||
mIndex = 0;
|
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);
|
boost::shared_ptr<Node> node = parseImp (true);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user