diff --git a/src/dawntools/prefabtool/PrefabComponentParser.cpp b/src/dawntools/prefabtool/PrefabComponentParser.cpp index ef626dfc..42824dd1 100644 --- a/src/dawntools/prefabtool/PrefabComponentParser.cpp +++ b/src/dawntools/prefabtool/PrefabComponentParser.cpp @@ -3,7 +3,6 @@ // This software is released under the MIT License. // https://opensource.org/licenses/MIT -#pragma once #include "PrefabComponentParser.hpp" using namespace Dawn; diff --git a/src/dawntools/prefabtool/PrefabRegistry.cpp b/src/dawntools/prefabtool/PrefabRegistry.cpp index bfd189bf..9473d408 100644 --- a/src/dawntools/prefabtool/PrefabRegistry.cpp +++ b/src/dawntools/prefabtool/PrefabRegistry.cpp @@ -64,7 +64,7 @@ struct PrefabComponentParserRuleset PrefabRegistry::getRuleset(std::string type) // Find each instance of "@optional" when it's used within a comment // e.g. // @optional or /* @optional */ in the string data. - std::regex regex("^\\s*(?:\\/\\/|\\/\\*){1}\\s*\\@optional\\s*(?:\\*\\/)?\\s*$", std::regex_constants::ECMAScript); + std::regex regex("^\\s*(?:\\/\\/|\\/\\*){1}\\s*\\@optional\\s*(?:\\*\\/)?\\s*$", std::regex_constants::ECMAScript | std::regex_constants::multiline); std::sregex_iterator it(data.begin(), data.end(), regex); std::sregex_iterator end; while(it != end) { @@ -92,7 +92,7 @@ struct PrefabComponentParserRuleset PrefabRegistry::getRuleset(std::string type) auto variableString = data.substr(varStart, varLength); // Now (should) be able to extract the type; - std::regex regex2("^\\s*(?:[\\S]+<)?([\\w*:_\\s]+)(?:[\\S]+)? (\\**[\\w]+)\\s*$", std::regex_constants::ECMAScript); + std::regex regex2("^\\s*(?:[\\S]+<)?([\\w*:_\\s]+)(?:[\\S]+)? (\\**[\\w]+)\\s*$", std::regex_constants::ECMAScript | std::regex_constants::multiline); std::smatch match; if(!std::regex_search(variableString, match, regex2)) { std::cout << "Failed to extract type and name from variable string! " << variableString << std::endl;