aboutsummaryrefslogtreecommitdiffstats
path: root/native/dicttoolkit
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-12-11 10:28:44 -0800
committerChih-Hung Hsieh <chh@google.com>2018-12-11 10:40:46 -0800
commit895bf97d22050ed8ed88d3df44d533be3cdf1445 (patch)
tree6c917c9382fc34ed0d8cda949665cc3cff96ae88 /native/dicttoolkit
parent55748c593631b24acf8b214d988bdd8cd3c78247 (diff)
downloadlatinime-895bf97d22050ed8ed88d3df44d533be3cdf1445.tar.gz
latinime-895bf97d22050ed8ed88d3df44d533be3cdf1445.tar.xz
latinime-895bf97d22050ed8ed88d3df44d533be3cdf1445.zip
Fix performance-for-range-copy warnings
Bug: 30413223 Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance* Change-Id: I06021a6597705515dc7a3cb81a7fbbac7ba344a1
Diffstat (limited to 'native/dicttoolkit')
-rw-r--r--native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp b/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp
index af28131cf..e94a9c2ff 100644
--- a/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp
+++ b/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp
@@ -93,7 +93,7 @@ const WordProperty *OffdeviceIntermediateDict::getWordProperty(
const OffdeviceIntermediateDictPtNodeArray *ptNodeArray = &mRootPtNodeArray;
for (size_t i = 0; i < codePoints.size();) {
bool foundNext = false;
- for (const auto ptNode : ptNodeArray->getPtNodeList()) {
+ for (const auto& ptNode : ptNodeArray->getPtNodeList()) {
const CodePointArrayView ptNodeCodePoints = ptNode->getPtNodeCodePoints();
if (codePoints[i] < ptNodeCodePoints[0]) {
continue;