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:
5bcbd34
)
use loop-local variable in qFindByteArray()
author
Ivailo Monev
<xakepa10@gmail.com>
Sun, 14 Feb 2021 13:47:22 +0000
(15:47 +0200)
committer
Ivailo Monev
<xakepa10@gmail.com>
Sun, 14 Feb 2021 13:47:22 +0000
(15:47 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/tools/qbytearraymatcher.cpp
patch
|
blob
|
history
diff --git
a/src/core/tools/qbytearraymatcher.cpp
b/src/core/tools/qbytearraymatcher.cpp
index
405b874
..
cbacac6
100644
(file)
--- a/
src/core/tools/qbytearraymatcher.cpp
+++ b/
src/core/tools/qbytearraymatcher.cpp
@@
-274,8
+274,7
@@
int qFindByteArray(
const char *end = haystack0 + (l - sl);
const uint sl_minus_1 = sl - 1;
uint hashNeedle = 0, hashHaystack = 0;
- int idx;
- for (idx = 0; idx < sl; ++idx) {
+ for (int idx = 0; idx < sl; ++idx) {
hashNeedle = ((hashNeedle<<1) + needle[idx]);
hashHaystack = ((hashHaystack<<1) + haystack[idx]);
}