OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
341d5a9
)
combine common return case in QByteArray::repeated()
author
Ivailo Monev
<xakepa10@laimg.moc>
Wed, 17 Jul 2019 13:53:58 +0000
(13:53 +0000)
committer
Ivailo Monev
<xakepa10@laimg.moc>
Wed, 17 Jul 2019 13:53:58 +0000
(13:53 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/tools/qbytearray.cpp
patch
|
blob
|
history
diff --git
a/src/core/tools/qbytearray.cpp
b/src/core/tools/qbytearray.cpp
index
e2e2bf3
..
1a7e776
100644
(file)
--- a/
src/core/tools/qbytearray.cpp
+++ b/
src/core/tools/qbytearray.cpp
@@
-2249,12
+2249,10
@@
QList<QByteArray> QByteArray::split(char sep) const
*/
QByteArray QByteArray::repeated(const int times) const
{
- if (d->size == 0)
+ if (d->size == 0
|| times == 1
)
return *this;
- if (times <= 1) {
- if (times == 1)
- return *this;
+ if (times < 1) {
return QByteArray();
}