Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
733a64aa
Commit
733a64aa
authored
Dec 07, 2010
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compatibility with wxWdigets 2.9+: use wxString::const_iterator instead of raw Char*
parent
f674e87f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/script/functions/regex.cpp
src/script/functions/regex.cpp
+5
-5
No files found.
src/script/functions/regex.cpp
View file @
733a64aa
...
@@ -28,7 +28,7 @@ class ScriptRegex : public ScriptValue, public Regex {
...
@@ -28,7 +28,7 @@ class ScriptRegex : public ScriptValue, public Regex {
}
}
/// Match only if in_context also matches
/// Match only if in_context also matches
bool
matches
(
Results
&
results
,
const
String
&
str
,
const
Char
*
begin
,
const
ScriptRegexP
&
in_context
)
{
bool
matches
(
Results
&
results
,
const
String
&
str
,
String
::
const_iterator
begin
,
const
ScriptRegexP
&
in_context
)
{
if
(
!
in_context
)
{
if
(
!
in_context
)
{
return
matches
(
results
,
begin
,
str
.
end
());
return
matches
(
results
,
begin
,
str
.
end
());
}
else
{
}
else
{
...
@@ -73,7 +73,7 @@ struct RegexReplacer {
...
@@ -73,7 +73,7 @@ struct RegexReplacer {
String
apply
(
Context
&
ctx
,
const
String
&
input
,
int
level
=
0
)
const
{
String
apply
(
Context
&
ctx
,
const
String
&
input
,
int
level
=
0
)
const
{
String
ret
;
String
ret
;
const
Char
*
start
=
input
.
begin
();
String
::
const_iterator
start
=
input
.
begin
();
ScriptRegex
::
Results
results
;
ScriptRegex
::
Results
results
;
while
(
match
->
matches
(
results
,
input
,
start
,
context
))
{
while
(
match
->
matches
(
results
,
input
,
start
,
context
))
{
// for each match ...
// for each match ...
...
@@ -149,7 +149,7 @@ SCRIPT_FUNCTION_WITH_SIMPLIFY(filter_text) {
...
@@ -149,7 +149,7 @@ SCRIPT_FUNCTION_WITH_SIMPLIFY(filter_text) {
SCRIPT_OPTIONAL_PARAM_C_
(
ScriptRegexP
,
in_context
);
SCRIPT_OPTIONAL_PARAM_C_
(
ScriptRegexP
,
in_context
);
String
ret
;
String
ret
;
// find all matches
// find all matches
const
Char
*
start
=
input
.
begin
();
String
::
const_iterator
start
=
input
.
begin
();
ScriptRegex
::
Results
results
;
ScriptRegex
::
Results
results
;
while
(
match
->
matches
(
results
,
input
,
start
,
in_context
))
{
while
(
match
->
matches
(
results
,
input
,
start
,
in_context
))
{
// match, append to result
// match, append to result
...
@@ -176,7 +176,7 @@ SCRIPT_FUNCTION_WITH_SIMPLIFY(break_text) {
...
@@ -176,7 +176,7 @@ SCRIPT_FUNCTION_WITH_SIMPLIFY(break_text) {
SCRIPT_OPTIONAL_PARAM_C_
(
ScriptRegexP
,
in_context
);
SCRIPT_OPTIONAL_PARAM_C_
(
ScriptRegexP
,
in_context
);
ScriptCustomCollectionP
ret
(
new
ScriptCustomCollection
);
ScriptCustomCollectionP
ret
(
new
ScriptCustomCollection
);
// find all matches
// find all matches
const
Char
*
start
=
input
.
begin
();
String
::
const_iterator
start
=
input
.
begin
();
ScriptRegex
::
Results
results
;
ScriptRegex
::
Results
results
;
while
(
match
->
matches
(
results
,
input
,
start
,
in_context
))
{
while
(
match
->
matches
(
results
,
input
,
start
,
in_context
))
{
// match, append to result
// match, append to result
...
@@ -202,7 +202,7 @@ SCRIPT_FUNCTION_WITH_SIMPLIFY(split_text) {
...
@@ -202,7 +202,7 @@ SCRIPT_FUNCTION_WITH_SIMPLIFY(split_text) {
SCRIPT_PARAM_DEFAULT_N
(
bool
,
_
(
"include empty"
),
include_empty
,
true
);
SCRIPT_PARAM_DEFAULT_N
(
bool
,
_
(
"include empty"
),
include_empty
,
true
);
ScriptCustomCollectionP
ret
(
new
ScriptCustomCollection
);
ScriptCustomCollectionP
ret
(
new
ScriptCustomCollection
);
// find all matches
// find all matches
const
Char
*
start
=
input
.
begin
();
String
::
const_iterator
start
=
input
.
begin
();
ScriptRegex
::
Results
results
;
ScriptRegex
::
Results
results
;
while
(
match
->
matches
(
results
,
start
,
input
.
end
()))
{
while
(
match
->
matches
(
results
,
start
,
input
.
end
()))
{
// match, append the part before it to the result
// match, append the part before it to the result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment