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

Unified Diff: core/fpdfdoc/cpdf_variabletext.cpp

Issue 1960043003: Fix some misc nits. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 7 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 | core/fpdfdoc/cpvt_generateap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/cpdf_variabletext.cpp
diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp
index 118efa6a103585e012c0230f8fc7a4defea760d7..a8b9c3c7783bf71c4ef00d0ecfbb83630624a357 100644
--- a/core/fpdfdoc/cpdf_variabletext.cpp
+++ b/core/fpdfdoc/cpdf_variabletext.cpp
@@ -1112,9 +1112,8 @@ int32_t CPDF_VariableText::GetCharWidth(int32_t nFontIndex,
int32_t nWordStyle) {
if (!m_pVTProvider)
return 0;
- if (SubWord > 0)
- return m_pVTProvider->GetCharWidth(nFontIndex, SubWord, nWordStyle);
- return m_pVTProvider->GetCharWidth(nFontIndex, Word, nWordStyle);
+ uint16_t word = SubWord ? SubWord : Word;
Wei Li 2016/05/12 21:11:59 SubWord > 0 ? SubWord : Word
Lei Zhang 2016/05/12 22:11:31 |SubWord| is unsigned, so it doesn't matter?
+ return m_pVTProvider->GetCharWidth(nFontIndex, word, nWordStyle);
}
int32_t CPDF_VariableText::GetTypeAscent(int32_t nFontIndex) {
« no previous file with comments | « no previous file | core/fpdfdoc/cpvt_generateap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698