mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
compatibility with wxWdigets 2.9+: use wxString::const_iterator instead of raw Char*
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1528 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+4
-4
@@ -38,7 +38,7 @@
|
|||||||
*/
|
*/
|
||||||
class Regex {
|
class Regex {
|
||||||
public:
|
public:
|
||||||
struct Results : public boost::match_results<const Char*> {
|
struct Results : public boost::match_results<String::const_iterator> {
|
||||||
/// Get a sub match
|
/// Get a sub match
|
||||||
inline String str(int sub = 0) const {
|
inline String str(int sub = 0) const {
|
||||||
const_reference v = (*this)[sub];
|
const_reference v = (*this)[sub];
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
inline String format(const String& format) const {
|
inline String format(const String& format) const {
|
||||||
std::basic_string<Char> fmt(format.begin(),format.end());
|
std::basic_string<Char> fmt(format.begin(),format.end());
|
||||||
String output;
|
String output;
|
||||||
boost::match_results<const Char*>::format(
|
boost::match_results<String::const_iterator>::format(
|
||||||
insert_iterator<String>(output, output.end()), fmt, boost::format_sed);
|
insert_iterator<String>(output, output.end()), fmt, boost::format_sed);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
@@ -62,9 +62,9 @@
|
|||||||
return regex_search(str.begin(), str.end(), regex);
|
return regex_search(str.begin(), str.end(), regex);
|
||||||
}
|
}
|
||||||
inline bool matches(Results& results, const String& str) const {
|
inline bool matches(Results& results, const String& str) const {
|
||||||
return regex_search(str.begin(), str.end(), results, regex);
|
return matches(results, str.begin(), str.end());
|
||||||
}
|
}
|
||||||
inline bool matches(Results& results, const Char* begin, const Char* end) const {
|
inline bool matches(Results& results, const String::const_iterator& begin, const String::const_iterator& end) const {
|
||||||
return regex_search(begin, end, results, regex);
|
return regex_search(begin, end, results, regex);
|
||||||
}
|
}
|
||||||
void replace_all(String* input, const String& format);
|
void replace_all(String* input, const String& format);
|
||||||
|
|||||||
Reference in New Issue
Block a user