diff --git a/plugins/dm.conversation/ConversationEditor.cpp b/plugins/dm.conversation/ConversationEditor.cpp index 728b080eb1..67fe29d5c5 100644 --- a/plugins/dm.conversation/ConversationEditor.cpp +++ b/plugins/dm.conversation/ConversationEditor.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include "CommandEditor.h" #include "ActorNodeFinder.h" @@ -582,8 +582,8 @@ void ConversationEditor::onDeleteCommand(wxCommandEvent& ev) std::string ConversationEditor::removeMarkup(const std::string& input) { - boost::regex expr("(<[A-Za-z]+>)|()"); - return boost::regex_replace(input, expr, ""); + std::regex expr("(<[A-Za-z]+>)|()"); + return std::regex_replace(input, expr, ""); } } // namespace ui diff --git a/plugins/dm.conversation/ConversationKeyExtractor.cpp b/plugins/dm.conversation/ConversationKeyExtractor.cpp index 94577e4fde..2765faa557 100644 --- a/plugins/dm.conversation/ConversationKeyExtractor.cpp +++ b/plugins/dm.conversation/ConversationKeyExtractor.cpp @@ -3,7 +3,7 @@ #include "itextstream.h" #include -#include +#include #include #include #include @@ -25,11 +25,11 @@ void ConversationKeyExtractor::operator()(const std::string& key, const std::str if (key.substr(0, 4) != "conv") return; // Extract the objective number - static const boost::regex reConvNum("conv_(\\d+)_(.*)"); - boost::smatch results; + static const std::regex reConvNum("conv_(\\d+)_(.*)"); + std::smatch results; int iNum; - if (!boost::regex_match(key, results, reConvNum)) { + if (!std::regex_match(key, results, reConvNum)) { // No match, abort return; } @@ -70,10 +70,10 @@ void ConversationKeyExtractor::operator()(const std::string& key, const std::str } else if (convSubString.substr(0, 4) == "cmd_") { // This is a conversation command, form a new regex - static const boost::regex reCommand("cmd_(\\d+)_(.*)"); - boost::smatch results; + static const std::regex reCommand("cmd_(\\d+)_(.*)"); + std::smatch results; - if (!boost::regex_match(convSubString, results, reCommand)) { + if (!std::regex_match(convSubString, results, reCommand)) { return; // not matching } diff --git a/plugins/dm.editing/FixupMap.cpp b/plugins/dm.editing/FixupMap.cpp index 4e3608bb6c..717434e303 100644 --- a/plugins/dm.editing/FixupMap.cpp +++ b/plugins/dm.editing/FixupMap.cpp @@ -18,7 +18,7 @@ #include "SpawnargReplacer.h" #include "DeprecatedEclassCollector.h" -#include +#include #include FixupMap::FixupMap(const std::string& filename) : @@ -83,10 +83,10 @@ void FixupMap::performFixup(const std::string& line) return; } - boost::regex expr("^" + MATERIAL_PREFIX + "(.*)\\s=>\\s(.*)$"); - boost::smatch matches; + std::regex expr("^" + MATERIAL_PREFIX + "(.*)\\s=>\\s(.*)$"); + std::smatch matches; - if (boost::regex_match(line, matches, expr)) + if (std::regex_match(line, matches, expr)) { // Fixup a specific shader std::string oldShader = matches[1]; @@ -96,9 +96,9 @@ void FixupMap::performFixup(const std::string& line) return; } - expr = boost::regex("^" + ENTITYDEF_PREFIX + "(.*)\\s=>\\s(.*)$"); + expr = std::regex("^" + ENTITYDEF_PREFIX + "(.*)\\s=>\\s(.*)$"); - if (boost::regex_match(line, matches, expr)) + if (std::regex_match(line, matches, expr)) { // Fixup a specific entitydef std::string oldDef = matches[1]; @@ -110,9 +110,9 @@ void FixupMap::performFixup(const std::string& line) } // No specific prefix, this can be everything: spawnarg or texture - expr = boost::regex("^(.*)\\s=>\\s(.*)$"); + expr = std::regex("^(.*)\\s=>\\s(.*)$"); - if (boost::regex_match(line, matches, expr)) + if (std::regex_match(line, matches, expr)) { std::string oldStr = matches[1]; std::string newStr = matches[2]; diff --git a/plugins/dm.objectives/ObjectiveEntity.cpp b/plugins/dm.objectives/ObjectiveEntity.cpp index 414129cd2d..da66f9e922 100644 --- a/plugins/dm.objectives/ObjectiveEntity.cpp +++ b/plugins/dm.objectives/ObjectiveEntity.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include @@ -52,14 +52,14 @@ void ObjectiveEntity::readObjectiveConditions(Entity& ent) Entity::KeyValuePairs condSpawnargs = ent.getKeyValuePairs(OBJ_COND_PREFIX); - static const boost::regex objCondExpr(OBJ_COND_PREFIX + "(\\d+)_(.*)"); + static const std::regex objCondExpr(OBJ_COND_PREFIX + "(\\d+)_(.*)"); for (Entity::KeyValuePairs::const_iterator kv = condSpawnargs.begin(); kv != condSpawnargs.end(); kv++) { - boost::smatch results; + std::smatch results; - if (!boost::regex_match(kv->first, results, objCondExpr)) + if (!std::regex_match(kv->first, results, objCondExpr)) { continue; // No match, abort } diff --git a/plugins/dm.objectives/ObjectiveKeyExtractor.cpp b/plugins/dm.objectives/ObjectiveKeyExtractor.cpp index 439f53ef51..4389987f0a 100644 --- a/plugins/dm.objectives/ObjectiveKeyExtractor.cpp +++ b/plugins/dm.objectives/ObjectiveKeyExtractor.cpp @@ -3,7 +3,7 @@ #include "itextstream.h" #include -#include +#include #include #include #include @@ -25,11 +25,11 @@ void ObjectiveKeyExtractor::operator()(const std::string& key, return; // Extract the objective number - static const boost::regex reObjNum("obj(\\d+)_(.*)"); - boost::smatch results; + static const std::regex reObjNum("obj(\\d+)_(.*)"); + std::smatch results; int iNum; - if (boost::regex_match(key, results, reObjNum)) { + if (std::regex_match(key, results, reObjNum)) { // Get the objective number iNum = string::convert(results[1]); } @@ -89,10 +89,10 @@ void ObjectiveKeyExtractor::operator()(const std::string& key, else { // Use another regex to check for components (obj1_1_blah) - static const boost::regex reComponent("(\\d+)_(.*)"); - boost::smatch results; + static const std::regex reComponent("(\\d+)_(.*)"); + std::smatch results; - if (!boost::regex_match(objSubString, results, reComponent)) { + if (!std::regex_match(objSubString, results, reComponent)) { return; } else { diff --git a/plugins/dm.stimresponse/ResponseEffect.cpp b/plugins/dm.stimresponse/ResponseEffect.cpp index fb184d81b3..647d338384 100644 --- a/plugins/dm.stimresponse/ResponseEffect.cpp +++ b/plugins/dm.stimresponse/ResponseEffect.cpp @@ -3,7 +3,7 @@ #include "i18n.h" #include "string/convert.h" #include -#include +#include ResponseEffect::ResponseEffect() : _state(true), @@ -186,8 +186,8 @@ void ResponseEffect::clearArgumentList() { std::string ResponseEffect::removeMarkup(const std::string& input) { - boost::regex expr("(<[A-Za-z]+>)|()"); - return boost::regex_replace(input, expr, ""); + std::regex expr("(<[A-Za-z]+>)|()"); + return std::regex_replace(input, expr, ""); } std::string ResponseEffect::getArgumentStr() diff --git a/plugins/dm.stimresponse/SRPropertyLoader.cpp b/plugins/dm.stimresponse/SRPropertyLoader.cpp index 2e021760ef..8e40406d6a 100644 --- a/plugins/dm.stimresponse/SRPropertyLoader.cpp +++ b/plugins/dm.stimresponse/SRPropertyLoader.cpp @@ -6,7 +6,7 @@ #include "gamelib.h" #include #include -#include +#include // Constructor SRPropertyLoader::SRPropertyLoader( @@ -43,10 +43,10 @@ void SRPropertyLoader::parseAttribute( // Construct a regex with the number as match variable std::string exprStr = "^" + prefix + _keys[i].key + "_([0-9])+$"; - boost::regex expr(exprStr); - boost::smatch matches; + std::regex expr(exprStr); + std::smatch matches; - if (boost::regex_match(key, matches, expr)) { + if (std::regex_match(key, matches, expr)) { // Retrieve the S/R index number int index = string::convert(matches[1]); @@ -82,10 +82,10 @@ void SRPropertyLoader::parseAttribute( // (with the optional postfix "_argN" or "_state") std::string exprStr = "^" + prefix + responseEffectPrefix + "([0-9]+)_([0-9]+)(_arg[0-9]+|_state)*$"; - boost::regex expr(exprStr); - boost::smatch matches; + std::regex expr(exprStr); + std::smatch matches; - if (boost::regex_match(key, matches, expr)) { + if (std::regex_match(key, matches, expr)) { // The response index int index = string::convert(matches[1]); // The effect index diff --git a/plugins/dm.stimresponse/SRPropertyRemover.cpp b/plugins/dm.stimresponse/SRPropertyRemover.cpp index c6132e601f..b8a28a408f 100644 --- a/plugins/dm.stimresponse/SRPropertyRemover.cpp +++ b/plugins/dm.stimresponse/SRPropertyRemover.cpp @@ -5,7 +5,7 @@ #include "entitylib.h" #include #include -#include +#include SRPropertyRemover::SRPropertyRemover( Entity* target, @@ -30,10 +30,10 @@ void SRPropertyRemover::visitKeyValue(const std::string& key, const std::string& for (unsigned int i = 0; i < _keys.size(); i++) { // Construct a regex with the number as match variable std::string exprStr = "^" + prefix + _keys[i].key + "_([0-9])+$"; - boost::regex expr(exprStr); - boost::smatch matches; + std::regex expr(exprStr); + std::smatch matches; - if (boost::regex_match(key, matches, expr)) { + if (std::regex_match(key, matches, expr)) { // We have a match, set the key on the black list _removeList.push_back(key); } @@ -41,10 +41,10 @@ void SRPropertyRemover::visitKeyValue(const std::string& key, const std::string& // This should search for something like "sr_effect_2_3*" std::string exprStr = "^" + prefix + "effect" + "_([0-9])+_([0-9])+(.*)$"; - boost::regex expr(exprStr); - boost::smatch matches; + std::regex expr(exprStr); + std::smatch matches; - if (boost::regex_match(key, matches, expr)) { + if (std::regex_match(key, matches, expr)) { _removeList.push_back(key); } } diff --git a/plugins/eventmanager/Event.h b/plugins/eventmanager/Event.h index 11b8d6f2da..2b541ce750 100644 --- a/plugins/eventmanager/Event.h +++ b/plugins/eventmanager/Event.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include namespace ui { @@ -109,8 +109,8 @@ class Event : std::string prevHelp = tool->GetShortHelp().ToStdString(); // Use a regex to cut off the trailing " (Ctrl-X)" - boost::regex expr("\\s\\(.+\\)$"); - return boost::regex_replace(prevHelp, expr, ""); + std::regex expr("\\s\\(.+\\)$"); + return std::regex_replace(prevHelp, expr, ""); } }; diff --git a/plugins/filters/XMLFilter.cpp b/plugins/filters/XMLFilter.cpp index ca1cf12051..e7b9f07745 100644 --- a/plugins/filters/XMLFilter.cpp +++ b/plugins/filters/XMLFilter.cpp @@ -3,7 +3,7 @@ #include "ientity.h" #include "ieclass.h" #include "ifilter.h" -#include +#include #include namespace filters { @@ -36,9 +36,9 @@ bool XMLFilter::isVisible(const FilterRule::Type type, const std::string& name) // If we have a rule for this item, use boost's regex to match the query name // against the "match" parameter - boost::regex ex(ruleIter->match); + std::regex ex(ruleIter->match); - if (boost::regex_match(name, ex)) + if (std::regex_match(name, ex)) { // Overwrite the visible flag with the value from the rule. visible = ruleIter->show; @@ -66,18 +66,18 @@ bool XMLFilter::isEntityVisible(const FilterRule::Type type, const Entity& entit if (type == FilterRule::TYPE_ENTITYCLASS) { - boost::regex ex(ruleIter->match); + std::regex ex(ruleIter->match); - if (boost::regex_match(eclass->getName(), ex)) + if (std::regex_match(eclass->getName(), ex)) { visible = ruleIter->show; } } else if (type == FilterRule::TYPE_ENTITYKEYVALUE) { - boost::regex ex(ruleIter->match); + std::regex ex(ruleIter->match); - if (boost::regex_match(entity.getKeyValue(ruleIter->entityKey), ex)) + if (std::regex_match(entity.getKeyValue(ruleIter->entityKey), ex)) { visible = ruleIter->show; } diff --git a/plugins/fonts/FontLoader.cpp b/plugins/fonts/FontLoader.cpp index 0639a10d87..9fedcb5f56 100644 --- a/plugins/fonts/FontLoader.cpp +++ b/plugins/fonts/FontLoader.cpp @@ -3,7 +3,7 @@ #include "os/path.h" #include "string/convert.h" -#include +#include #include "itextstream.h" #include "FontManager.h" @@ -16,10 +16,10 @@ void FontLoader::operator()(const std::string& filename) // Construct the full VFS path std::string fullPath = os::standardPath(_basePath + filename); - boost::regex expr("^/?(.*)/.*_(\\d{2})\\.dat$", boost::regex::icase); - boost::smatch matches; + std::regex expr("^/?(.*)/.*_(\\d{2})\\.dat$", std::regex::icase); + std::smatch matches; - if (boost::regex_match(filename, matches, expr)) + if (std::regex_match(filename, matches, expr)) { // Get the font name and resolution from the match std::string fontname = matches[1]; diff --git a/plugins/particles/ParticlesManager.cpp b/plugins/particles/ParticlesManager.cpp index fca77a9887..2a72156089 100644 --- a/plugins/particles/ParticlesManager.cpp +++ b/plugins/particles/ParticlesManager.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include namespace fs = boost::filesystem; @@ -432,14 +432,14 @@ void ParticlesManager::stripParticleDefFromStream(std::istream& input, std::ostream& output, const std::string& particleName) { std::string line; - boost::regex pattern("^[\\s]*particle[\\s]+" + particleName + "\\s*(\\{)*\\s*$"); + std::regex pattern("^[\\s]*particle[\\s]+" + particleName + "\\s*(\\{)*\\s*$"); while (std::getline(input, line)) { - boost::smatch matches; + std::smatch matches; // See if this line contains the particle def in question - if (boost::regex_match(line, matches, pattern)) + if (std::regex_match(line, matches, pattern)) { // Line matches, march from opening brace to the other one std::size_t openBraces = 0; diff --git a/radiant/model/ScaledModelExporter.cpp b/radiant/model/ScaledModelExporter.cpp index fadd410e87..0fa6d2e9b9 100644 --- a/radiant/model/ScaledModelExporter.cpp +++ b/radiant/model/ScaledModelExporter.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace fs = boost::filesystem; @@ -184,8 +184,8 @@ std::string ScaledModelExporter::generateUniqueModelFilename( std::string modelFilename = os::getFilename(modelPath.string()); // Remove any previously existing "_scaledN" suffix - boost::regex expr("_scaled\\d+\\."); - modelFilename = boost::regex_replace(modelFilename, expr, "."); + std::regex expr("_scaled\\d+\\."); + modelFilename = std::regex_replace(modelFilename, expr, "."); std::string filenameNoExt = fs::change_extension(modelFilename, "").string(); diff --git a/radiant/ui/einspector/EntityInspector.cpp b/radiant/ui/einspector/EntityInspector.cpp index 7632cfaedf..2bea323f77 100644 --- a/radiant/ui/einspector/EntityInspector.cpp +++ b/radiant/ui/einspector/EntityInspector.cpp @@ -40,7 +40,7 @@ #include #include -#include +#include namespace ui { @@ -1077,10 +1077,10 @@ EntityInspector::PropertyParms EntityInspector::getPropertyParmsForKey( if (i->first.empty()) continue; // safety check // Try to match the entity key against the regex (i->first) - boost::regex expr(i->first); - boost::smatch matches; + std::regex expr(i->first); + std::smatch matches; - if (!boost::regex_match(key, matches, expr)) continue; + if (!std::regex_match(key, matches, expr)) continue; // We have a match returnValue.type = i->second.type; diff --git a/radiant/ui/einspector/PropertyEditorFactory.cpp b/radiant/ui/einspector/PropertyEditorFactory.cpp index 52dd7f02fd..5ef466c0af 100644 --- a/radiant/ui/einspector/PropertyEditorFactory.cpp +++ b/radiant/ui/einspector/PropertyEditorFactory.cpp @@ -16,7 +16,7 @@ #include "AnglePropertyEditor.h" #include "modulesystem/ModuleRegistry.h" -#include +#include #include @@ -95,10 +95,10 @@ IPropertyEditorPtr PropertyEditorFactory::create(wxWindow* parent, const std::st if (i->first.empty()) continue; // skip empty keys // Try to match the entity key against the regex (i->first) - boost::regex expr(i->first); - boost::smatch matches; + std::regex expr(i->first); + std::smatch matches; - if (!boost::regex_match(key, matches, expr)) continue; + if (!std::regex_match(key, matches, expr)) continue; // We have a match return i->second->createNew(parent, entity, key, options); @@ -130,10 +130,10 @@ IPropertyEditorPtr PropertyEditorFactory::getRegisteredPropertyEditor(const std: if (i->first.empty()) continue; // skip empty keys // Try to match the entity key against the regex (i->first) - boost::regex expr(i->first); - boost::smatch matches; + std::regex expr(i->first); + std::smatch matches; - if (!boost::regex_match(key, matches, expr)) continue; + if (!std::regex_match(key, matches, expr)) continue; // We have a match return i->second;