Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KDevelop
KDevelop
Commits
aa3ce1e8
Commit
aa3ce1e8
authored
Sep 23, 2022
by
Milian Wolff
Browse files
Cleanup: remove more useless casts
All these types are int already, no need to c-cast them to int again.
parent
7d997e41
Changes
1
Hide whitespace changes
Inline
Side-by-side
kdevplatform/language/duchain/stringhelpers.cpp
View file @
aa3ce1e8
...
...
@@ -29,7 +29,7 @@ int strip_impl(const T& str, T& from)
if
(
from
[
a
]
==
str
[
i
])
{
i
++
;
ip
=
a
+
1
;
if
(
i
==
(
int
)
str
.
length
())
if
(
i
==
str
.
length
())
break
;
}
else
{
break
;
...
...
@@ -61,7 +61,7 @@ int rStrip_impl(const T& str, T& from)
if
(
from
[
a
]
==
str
[
i
])
{
i
++
;
ip
=
a
;
if
(
i
==
(
int
)
str
.
length
())
if
(
i
==
str
.
length
())
break
;
}
else
{
break
;
...
...
@@ -69,7 +69,7 @@ int rStrip_impl(const T& str, T& from)
}
}
if
(
ip
!=
(
int
)
from
.
length
())
{
if
(
ip
!=
from
.
length
())
{
from
=
from
.
left
(
ip
);
}
return
s
-
from
.
length
();
...
...
@@ -113,7 +113,7 @@ int findClose(const QString& str, int pos)
QList
<
QChar
>
st
;
QChar
last
=
QLatin1Char
(
' '
);
for
(
int
a
=
pos
;
a
<
(
int
)
str
.
length
();
a
++
)
{
for
(
int
a
=
pos
;
a
<
str
.
length
();
a
++
)
{
switch
(
str
[
a
].
unicode
())
{
case
'<'
:
case
'('
:
...
...
@@ -137,7 +137,7 @@ int findClose(const QString& str, int pos)
case
'"'
:
last
=
str
[
a
];
a
++
;
while
(
a
<
(
int
)
str
.
length
()
&&
(
str
[
a
]
!=
QLatin1Char
(
'"'
)
||
last
==
QLatin1Char
(
'\\'
)))
{
while
(
a
<
str
.
length
()
&&
(
str
[
a
]
!=
QLatin1Char
(
'"'
)
||
last
==
QLatin1Char
(
'\\'
)))
{
last
=
str
[
a
];
a
++
;
}
...
...
@@ -145,7 +145,7 @@ int findClose(const QString& str, int pos)
case
'\''
:
last
=
str
[
a
];
a
++
;
while
(
a
<
(
int
)
str
.
length
()
&&
(
str
[
a
]
!=
QLatin1Char
(
'\''
)
||
last
==
QLatin1Char
(
'\\'
)))
{
while
(
a
<
str
.
length
()
&&
(
str
[
a
]
!=
QLatin1Char
(
'\''
)
||
last
==
QLatin1Char
(
'\\'
)))
{
last
=
str
[
a
];
a
++
;
}
...
...
@@ -164,7 +164,7 @@ int findClose(const QString& str, int pos)
int
findCommaOrEnd
(
const
QString
&
str
,
int
pos
,
QChar
validEnd
)
{
for
(
int
a
=
pos
;
a
<
(
int
)
str
.
length
();
a
++
)
{
for
(
int
a
=
pos
;
a
<
str
.
length
();
a
++
)
{
switch
(
str
[
a
].
unicode
())
{
case
'"'
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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