mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Fix Regex::replace_all to actually do something
This commit is contained in:
+2
-4
@@ -24,10 +24,8 @@ void Regex::assign(const String& code) {
|
||||
}
|
||||
}
|
||||
|
||||
void Regex::replace_all(String* input, const String& format) {
|
||||
wxStdString std_string = toStdString(*input);
|
||||
regex_replace(std_string, regex, toStdString(format), boost::format_sed);
|
||||
*input = std_string;
|
||||
String Regex::replace_all(const String& input, const String& format) const {
|
||||
return regex_replace(toStdString(input), regex, toStdString(format), boost::format_sed);
|
||||
}
|
||||
|
||||
#else // USE_BOOST_REGEX
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@
|
||||
inline bool matches(Results& results, const String::const_iterator& begin, const String::const_iterator& end) const {
|
||||
return regex_search(begin, end, results, regex);
|
||||
}
|
||||
void replace_all(String* input, const String& format);
|
||||
String replace_all(const String& input, const String& format) const;
|
||||
|
||||
inline bool empty() const {
|
||||
return regex.empty();
|
||||
|
||||
Reference in New Issue
Block a user