Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2139)

Unified Diff: core/fpdfdoc/doc_utils.cpp

Issue 1891953002: Avoid needless construction of CFX_ByteStrings during string building (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | xfa/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/doc_utils.cpp
diff --git a/core/fpdfdoc/doc_utils.cpp b/core/fpdfdoc/doc_utils.cpp
index ccb244d87cc379fc18c72bb4e2b2a07f0f996e7a..408f0065e2dfc8aff47013664cab757f20585dd4 100644
--- a/core/fpdfdoc/doc_utils.cpp
+++ b/core/fpdfdoc/doc_utils.cpp
@@ -91,11 +91,11 @@ CFX_ByteString CPDF_DefaultAppearance::GetFontString() {
}
CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart("Tf", 2)) {
- csFont += (CFX_ByteString)syntax.GetWord();
+ csFont += syntax.GetWord();
csFont += " ";
- csFont += (CFX_ByteString)syntax.GetWord();
+ csFont += syntax.GetWord();
csFont += " ";
- csFont += (CFX_ByteString)syntax.GetWord();
+ csFont += syntax.GetWord();
}
return csFont;
}
@@ -135,31 +135,31 @@ CFX_ByteString CPDF_DefaultAppearance::GetColorString(
}
CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart(bStrokingOperation ? "G" : "g", 1)) {
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
csColor += " ";
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
return csColor;
}
if (syntax.FindTagParamFromStart(bStrokingOperation ? "RG" : "rg", 3)) {
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
csColor += " ";
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
csColor += " ";
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
csColor += " ";
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
return csColor;
}
if (syntax.FindTagParamFromStart(bStrokingOperation ? "K" : "k", 4)) {
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
csColor += " ";
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
csColor += " ";
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
csColor += " ";
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
csColor += " ";
- csColor += (CFX_ByteString)syntax.GetWord();
+ csColor += syntax.GetWord();
}
return csColor;
}
@@ -245,10 +245,10 @@ CFX_ByteString CPDF_DefaultAppearance::GetTextMatrixString() {
CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart("Tm", 6)) {
for (int i = 0; i < 6; i++) {
- csTM += (CFX_ByteString)syntax.GetWord();
+ csTM += syntax.GetWord();
csTM += " ";
}
- csTM += (CFX_ByteString)syntax.GetWord();
+ csTM += syntax.GetWord();
}
return csTM;
}
« no previous file with comments | « no previous file | xfa/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698