Rez: --define and --include options were accidentally non-optional. (issue #11)

This commit is contained in:
Wolfgang Thaller 2014-10-29 08:40:30 +01:00
parent 30db43bf10
commit 2a86126dad

View File

@ -88,10 +88,12 @@ int main(int argc, const char *argv[])
{ {
RezLexer lexer(fn); RezLexer lexer(fn);
for(std::string define : options["define"].as<std::vector<std::string>>()) if(options.count("define"))
lexer.addDefine(define); for(std::string define : options["define"].as<std::vector<std::string>>())
for(std::string path : options["include"].as<std::vector<std::string>>()) lexer.addDefine(define);
lexer.addIncludePath(path); if(options.count("include"))
for(std::string path : options["include"].as<std::vector<std::string>>())
lexer.addIncludePath(path);
RezParser parser(lexer, world); RezParser parser(lexer, world);