summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_clippath.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_colorspace.cpp14
-rw-r--r--core/fpdfapi/page/fpdf_page_func.cpp3
3 files changed, 10 insertions, 9 deletions
diff --git a/core/fpdfapi/page/cpdf_clippath.cpp b/core/fpdfapi/page/cpdf_clippath.cpp
index 8c268a1b5e..9d4b737d33 100644
--- a/core/fpdfapi/page/cpdf_clippath.cpp
+++ b/core/fpdfapi/page/cpdf_clippath.cpp
@@ -100,7 +100,7 @@ void CPDF_ClipPath::AppendTexts(
if (pData->m_TextList.size() + pTexts->size() <= FPDF_CLIPPATH_MAX_TEXTS) {
for (size_t i = 0; i < pTexts->size(); i++)
pData->m_TextList.push_back(std::move((*pTexts)[i]));
- pData->m_TextList.push_back(std::unique_ptr<CPDF_TextObject>());
+ pData->m_TextList.push_back(nullptr);
}
pTexts->clear();
}
diff --git a/core/fpdfapi/page/cpdf_colorspace.cpp b/core/fpdfapi/page/cpdf_colorspace.cpp
index fe840d10df..e43bacc079 100644
--- a/core/fpdfapi/page/cpdf_colorspace.cpp
+++ b/core/fpdfapi/page/cpdf_colorspace.cpp
@@ -332,7 +332,7 @@ CPDF_ColorSpace* CPDF_ColorSpace::GetStockCS(int family) {
std::unique_ptr<CPDF_ColorSpace> CPDF_ColorSpace::Load(CPDF_Document* pDoc,
CPDF_Object* pObj) {
if (!pObj)
- return std::unique_ptr<CPDF_ColorSpace>();
+ return nullptr;
if (pObj->IsName()) {
return std::unique_ptr<CPDF_ColorSpace>(
@@ -341,7 +341,7 @@ std::unique_ptr<CPDF_ColorSpace> CPDF_ColorSpace::Load(CPDF_Document* pDoc,
if (CPDF_Stream* pStream = pObj->AsStream()) {
CPDF_Dictionary* pDict = pStream->GetDict();
if (!pDict)
- return std::unique_ptr<CPDF_ColorSpace>();
+ return nullptr;
for (const auto& it : *pDict) {
std::unique_ptr<CPDF_ColorSpace> pRet;
@@ -351,16 +351,16 @@ std::unique_ptr<CPDF_ColorSpace> CPDF_ColorSpace::Load(CPDF_Document* pDoc,
if (pRet)
return pRet;
}
- return std::unique_ptr<CPDF_ColorSpace>();
+ return nullptr;
}
CPDF_Array* pArray = pObj->AsArray();
if (!pArray || pArray->IsEmpty())
- return std::unique_ptr<CPDF_ColorSpace>();
+ return nullptr;
CPDF_Object* pFamilyObj = pArray->GetDirectObjectAt(0);
if (!pFamilyObj)
- return std::unique_ptr<CPDF_ColorSpace>();
+ return nullptr;
CFX_ByteString familyname = pFamilyObj->GetString();
if (pArray->GetCount() == 1)
@@ -386,11 +386,11 @@ std::unique_ptr<CPDF_ColorSpace> CPDF_ColorSpace::Load(CPDF_Document* pDoc,
} else if (id == FXBSTR_ID('P', 'a', 't', 't')) {
pCS.reset(new CPDF_PatternCS(pDoc));
} else {
- return std::unique_ptr<CPDF_ColorSpace>();
+ return nullptr;
}
pCS->m_pArray = pArray;
if (!pCS->v_Load(pDoc, pArray))
- return std::unique_ptr<CPDF_ColorSpace>();
+ return nullptr;
return pCS;
}
diff --git a/core/fpdfapi/page/fpdf_page_func.cpp b/core/fpdfapi/page/fpdf_page_func.cpp
index a2e31f94bb..df658844cd 100644
--- a/core/fpdfapi/page/fpdf_page_func.cpp
+++ b/core/fpdfapi/page/fpdf_page_func.cpp
@@ -751,7 +751,8 @@ std::unique_ptr<CPDF_Function> CPDF_Function::Load(CPDF_Object* pFuncObj) {
pFunc.reset(new CPDF_PSFunc());
if (!pFunc || !pFunc->Init(pFuncObj))
- return std::unique_ptr<CPDF_Function>();
+ return nullptr;
+
return pFunc;
}