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:
846af35
)
avoid temporary in QTextCodec::codecForName()
author
Ivailo Monev
<xakepa10@laimg.moc>
Mon, 16 Dec 2019 02:17:56 +0000
(
02:17
+0000)
committer
Ivailo Monev
<xakepa10@laimg.moc>
Mon, 16 Dec 2019 02:17:56 +0000
(
02:17
+0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/codecs/qtextcodec.cpp
patch
|
blob
|
history
diff --git
a/src/core/codecs/qtextcodec.cpp
b/src/core/codecs/qtextcodec.cpp
index
0c607da
..
99c647e
100644
(file)
--- a/
src/core/codecs/qtextcodec.cpp
+++ b/
src/core/codecs/qtextcodec.cpp
@@
-572,11
+572,11
@@
QTextCodec *QTextCodec::codecForName(const QByteArray &name)
if (nameMatch(cursor->name(), name)) {
return cursor;
}
- QList<QByteArray> aliases = cursor->aliases();
- for (int y = 0; y < aliases.size(); ++y)
- if (nameMatch(aliases.at(y), name)) {
+ foreach (const QByteArray &alias, cursor->aliases()) {
+ if (nameMatch(alias, name)) {
return cursor;
}
+ }
}
return createForName(name);