summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_cmapparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/font/cpdf_cmapparser.cpp')
-rw-r--r--core/fpdfapi/font/cpdf_cmapparser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/font/cpdf_cmapparser.cpp b/core/fpdfapi/font/cpdf_cmapparser.cpp
index 5bfe17b34f..fca1c92af9 100644
--- a/core/fpdfapi/font/cpdf_cmapparser.cpp
+++ b/core/fpdfapi/font/cpdf_cmapparser.cpp
@@ -109,7 +109,7 @@ void CPDF_CMapParser::ParseWord(const ByteStringView& word) {
m_Status = 0;
} else if (m_Status == 7) {
if (word == "endcodespacerange") {
- auto code_ranges = m_pCMap->GetMixedFourByteLeadingRanges();
+ const auto& code_ranges = m_pCMap->GetMixedFourByteLeadingRanges();
size_t nSegs = code_ranges.size();
if (nSegs == 1) {
m_pCMap->SetCodingScheme((code_ranges[0].m_CharSize == 2)
@@ -117,7 +117,7 @@ void CPDF_CMapParser::ParseWord(const ByteStringView& word) {
: CPDF_CMap::OneByte);
} else if (nSegs > 1) {
m_pCMap->SetCodingScheme(CPDF_CMap::MixedFourBytes);
- for (auto range : m_PendingRanges)
+ for (const auto& range : m_PendingRanges)
m_pCMap->AppendMixedFourByteLeadingRanges(range);
m_PendingRanges.clear();
}