diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-23 16:05:07 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-23 16:05:07 -0700 |
commit | 8844560e7f1e7669fbeee0ccd48e99ab1882e3e7 (patch) | |
tree | 0dd690cbf5e56e48cb294a6227469cea8f658295 /core/src/fpdfapi | |
parent | 83d7e4812acc6f8dff9cd40b68f3a566d870f053 (diff) | |
download | pdfium-8844560e7f1e7669fbeee0ccd48e99ab1882e3e7.tar.xz |
XFA: take small tidying from master in fpdf_parser_parser.cpp
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1423693005 .
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index fe8975fba0..dd416fbd57 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -2068,7 +2068,6 @@ CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjects* pObjList, FX_BOOL bTypeOnly = pContext && (pContext->m_Flags & PDFPARSE_TYPEONLY); FX_BOOL bIsNumber; CFX_ByteString word = GetNextWord(bIsNumber); - CPDF_Object* pRet = NULL; if (word.GetLength() == 0) { if (bTypeOnly) { return (CPDF_Object*)PDFOBJ_INVALID; @@ -2098,15 +2097,13 @@ CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjects* pObjList, if (bTypeOnly) { return (CPDF_Object*)PDFOBJ_BOOLEAN; } - pRet = CPDF_Boolean::Create(word == FX_BSTRC("true")); - return pRet; + return CPDF_Boolean::Create(word == FX_BSTRC("true")); } if (word == FX_BSTRC("null")) { if (bTypeOnly) { return (CPDF_Object*)PDFOBJ_NULL; } - pRet = CPDF_Null::Create(); - return pRet; + return CPDF_Null::Create(); } if (word == FX_BSTRC("(")) { if (bTypeOnly) { @@ -2116,8 +2113,7 @@ CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjects* pObjList, if (m_pCryptoHandler && bDecrypt) { m_pCryptoHandler->Decrypt(objnum, gennum, str); } - pRet = CPDF_String::Create(str, FALSE); - return pRet; + return CPDF_String::Create(str, FALSE); } if (word == FX_BSTRC("<")) { if (bTypeOnly) { @@ -2127,8 +2123,7 @@ CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjects* pObjList, if (m_pCryptoHandler && bDecrypt) { m_pCryptoHandler->Decrypt(objnum, gennum, str); } - pRet = CPDF_String::Create(str, TRUE); - return pRet; + return CPDF_String::Create(str, TRUE); } if (word == FX_BSTRC("[")) { if (bTypeOnly) { @@ -2144,9 +2139,8 @@ CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjects* pObjList, if (bTypeOnly) { return (CPDF_Object*)PDFOBJ_NAME; } - pRet = CPDF_Name::Create( + return CPDF_Name::Create( PDF_NameDecode(CFX_ByteStringC(m_WordBuffer + 1, m_WordSize - 1))); - return pRet; } if (word == FX_BSTRC("<<")) { if (bTypeOnly) |