XFA: take small tidying from master in fpdf_parser_parser.cpp
authorTom Sepez <tsepez@chromium.org>
Fri, 23 Oct 2015 23:05:07 +0000 (16:05 -0700)
committerTom Sepez <tsepez@chromium.org>
Fri, 23 Oct 2015 23:05:07 +0000 (16:05 -0700)
R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1423693005 .

core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp

index fe8975f..dd416fb 100644 (file)
@@ -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)