And some more casting

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-09-02 22:00:37 +00:00
parent a336f999c2
commit f9c62cfcdd

View File

@@ -1071,7 +1071,7 @@ void wxTextCtrl::SearchForBrackets()
char bracket = ' '; char bracket = ' ';
if (m_cursorX > 0) if (m_cursorX > 0)
bracket = current[(size_t) m_cursorX-1]; bracket = current[(size_t) (m_cursorX-1)];
if (bracket == ')' || bracket == ']' || bracket == '}') if (bracket == ')' || bracket == ']' || bracket == '}')
{ {
@@ -1098,7 +1098,7 @@ void wxTextCtrl::SearchForBrackets()
{ {
if (current[m] == '\'') if (current[m] == '\'')
{ {
if (m == 0 || current[m-1] != '\\') if (m == 0 || current[(size_t) (m-1)] != '\\')
break; break;
} }
n = m-1; n = m-1;
@@ -1113,7 +1113,7 @@ void wxTextCtrl::SearchForBrackets()
{ {
if (current[m] == '\"') if (current[m] == '\"')
{ {
if (m == 0 || current[m-1] != '\\') if (m == 0 || current[(size_t) (m-1)] != '\\')
break; break;
} }
n = m-1; n = m-1;
@@ -1174,7 +1174,7 @@ void wxTextCtrl::SearchForBrackets()
{ {
if (current[m] == '\'') if (current[m] == '\'')
{ {
if (m == 0 || (current[m-1] != '\\') || (m >= 2 && current[m-2] == '\\')) if (m == 0 || (current[(size_t) (m-1)] != '\\') || (m >= 2 && current[(size_t) (m-2)] == '\\'))
break; break;
} }
n = m+1; n = m+1;
@@ -1189,7 +1189,7 @@ void wxTextCtrl::SearchForBrackets()
{ {
if (current[m] == '\"') if (current[m] == '\"')
{ {
if (m == 0 || (current[m-1] != '\\') || (m >= 2 && current[m-2] == '\\')) if (m == 0 || (current[(size_t) (m-1)] != '\\') || (m >= 2 && current[(size_t) (m-2)] == '\\'))
break; break;
} }
n = m+1; n = m+1;
@@ -1575,7 +1575,7 @@ wxString wxTextCtrl::GetNextToken( wxString &line, size_t &pos )
} }
else else
{ {
if ((line[p] == '/') && (p+1 < len) && (line[p+1] == '/')) if ((line[p] == '/') && (p+1 < len) && (line[(size_t) (p+1)] == '/'))
{ {
for (size_t q = p; q < len; q++) for (size_t q = p; q < len; q++)
ret.Append( line[q] ); ret.Append( line[q] );
@@ -1590,7 +1590,7 @@ wxString wxTextCtrl::GetNextToken( wxString &line, size_t &pos )
for (size_t q = p+1; q < len; q++) for (size_t q = p+1; q < len; q++)
{ {
ret.Append( line[q] ); ret.Append( line[q] );
if ((line[q] == '"') && ((line[q-1] != '\\') || (q >= 2 && line[q-2] == '\\'))) if ((line[q] == '"') && ((line[(size_t) (q-1)] != '\\') || (q >= 2 && line[(size_t) (q-2)] == '\\')))
break; break;
} }
pos = p; pos = p;
@@ -1603,7 +1603,7 @@ wxString wxTextCtrl::GetNextToken( wxString &line, size_t &pos )
for (size_t q = p+1; q < len; q++) for (size_t q = p+1; q < len; q++)
{ {
ret.Append( line[q] ); ret.Append( line[q] );
if ((line[q] == '\'') && ((line[q-1] != '\\') || (q >= 2 && line[q-2] == '\\'))) if ((line[q] == '\'') && ((line[(size_t) (q-1)] != '\\') || (q >= 2 && line[(size_t) (q-2)] == '\\')))
break; break;
} }
pos = p; pos = p;