compilation fixes for --with-regex=sys
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -513,7 +513,11 @@ int wxRegExImpl::Replace(wxString *text,
|
|||||||
// note that "^" shouldn't match after the first call to Matches() so we
|
// note that "^" shouldn't match after the first call to Matches() so we
|
||||||
// use wxRE_NOTBOL to prevent it from happening
|
// use wxRE_NOTBOL to prevent it from happening
|
||||||
while ( (!maxMatches || countRepl < maxMatches) &&
|
while ( (!maxMatches || countRepl < maxMatches) &&
|
||||||
|
#ifndef WXREGEX_CONVERT_TO_MB
|
||||||
Matches(textstr + matchStart,
|
Matches(textstr + matchStart,
|
||||||
|
#else
|
||||||
|
Matches(textstr.data() + matchStart,
|
||||||
|
#endif
|
||||||
countRepl ? wxRE_NOTBOL : 0
|
countRepl ? wxRE_NOTBOL : 0
|
||||||
WXREGEX_IF_NEED_LEN(textlen - matchStart)) )
|
WXREGEX_IF_NEED_LEN(textlen - matchStart)) )
|
||||||
{
|
{
|
||||||
@@ -559,7 +563,12 @@ int wxRegExImpl::Replace(wxString *text,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifndef WXREGEX_CONVERT_TO_MB
|
||||||
textNew += wxString(textstr + matchStart + start,
|
textNew += wxString(textstr + matchStart + start,
|
||||||
|
#else
|
||||||
|
textNew += wxString(textstr.data() + matchStart +
|
||||||
|
start,
|
||||||
|
#endif
|
||||||
*wxConvCurrent, len);
|
*wxConvCurrent, len);
|
||||||
|
|
||||||
mayHaveBackrefs = true;
|
mayHaveBackrefs = true;
|
||||||
@@ -589,7 +598,8 @@ int wxRegExImpl::Replace(wxString *text,
|
|||||||
#ifndef WXREGEX_CONVERT_TO_MB
|
#ifndef WXREGEX_CONVERT_TO_MB
|
||||||
result.append(*text, matchStart, start);
|
result.append(*text, matchStart, start);
|
||||||
#else
|
#else
|
||||||
result.append(wxString(textstr + matchStart, *wxConvCurrent, start));
|
result.append(wxString(textstr.data() + matchStart, *wxConvCurrent,
|
||||||
|
start));
|
||||||
#endif
|
#endif
|
||||||
matchStart += start;
|
matchStart += start;
|
||||||
result.append(textNew);
|
result.append(textNew);
|
||||||
@@ -602,7 +612,7 @@ int wxRegExImpl::Replace(wxString *text,
|
|||||||
#ifndef WXREGEX_CONVERT_TO_MB
|
#ifndef WXREGEX_CONVERT_TO_MB
|
||||||
result.append(*text, matchStart, wxString::npos);
|
result.append(*text, matchStart, wxString::npos);
|
||||||
#else
|
#else
|
||||||
result.append(wxString(textstr + matchStart, *wxConvCurrent));
|
result.append(wxString(textstr.data() + matchStart, *wxConvCurrent));
|
||||||
#endif
|
#endif
|
||||||
*text = result;
|
*text = result;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user