diff options
-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) |