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
PIM
KMime
Commits
f05864ce
Commit
f05864ce
authored
Sep 16, 2022
by
Christian Schoenebeck
Committed by
Sandro Knauß
Sep 29, 2022
Browse files
Adjust code style
- Don't use ++pos incrementation in expression. - Don't use Elvis operator.
parent
f85cf21c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kmime_util.cpp
View file @
f05864ce
...
...
@@ -254,8 +254,8 @@ QByteArray foldHeader(const QByteArray &header)
}
// fast forward to header body
int
pos
=
header
.
indexOf
(
':'
);
if
(
pos
<
0
||
++
pos
>=
header
.
length
())
{
int
pos
=
header
.
indexOf
(
':'
)
+
1
;
if
(
pos
<
=
0
||
pos
>=
header
.
length
())
{
return
header
;
}
...
...
@@ -278,7 +278,7 @@ QByteArray foldHeader(const QByteArray &header)
if
(
pos
-
start
>
maxLen
&&
eligible
)
{
// Fold line preferably at recommended position, at eligible position
// otherwise.
const
int
fws
=
recommended
?:
eligible
;
const
int
fws
=
recommended
?
recommended
:
eligible
;
hdr
.
insert
(
fws
,
'\n'
);
// We started a new line, so reset.
if
(
eligible
<=
fws
)
{
...
...
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