summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fgas/font/cfgas_gefont.cpp11
-rw-r--r--xfa/fwl/cfwl_caret.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_resolveprocessor.cpp2
3 files changed, 7 insertions, 8 deletions
diff --git a/xfa/fgas/font/cfgas_gefont.cpp b/xfa/fgas/font/cfgas_gefont.cpp
index ab773698e7..b1bd769336 100644
--- a/xfa/fgas/font/cfgas_gefont.cpp
+++ b/xfa/fgas/font/cfgas_gefont.cpp
@@ -160,12 +160,11 @@ bool CFGAS_GEFont::InitFont() {
if (!m_pFont)
return false;
- if (!m_pFontEncoding) {
- m_pFontEncoding.reset(FX_CreateFontEncodingEx(m_pFont));
- if (!m_pFontEncoding)
- return false;
- }
- return true;
+ if (m_pFontEncoding)
+ return true;
+
+ m_pFontEncoding = FX_CreateFontEncodingEx(m_pFont, FXFM_ENCODING_NONE);
+ return !!m_pFontEncoding;
}
CFX_RetainPtr<CFGAS_GEFont> CFGAS_GEFont::Derive(uint32_t dwFontStyles,
diff --git a/xfa/fwl/cfwl_caret.cpp b/xfa/fwl/cfwl_caret.cpp
index da57cb408c..a6ea9ddb56 100644
--- a/xfa/fwl/cfwl_caret.cpp
+++ b/xfa/fwl/cfwl_caret.cpp
@@ -25,7 +25,7 @@ CFWL_Caret::CFWL_Caret(const CFWL_App* app,
std::unique_ptr<CFWL_WidgetProperties> properties,
CFWL_Widget* pOuter)
: CFWL_Widget(app, std::move(properties), pOuter),
- m_pTimer(new CFWL_Caret::Timer(this)),
+ m_pTimer(pdfium::MakeUnique<CFWL_Caret::Timer>(this)),
m_pTimerInfo(nullptr) {
SetStates(FWL_STATE_CAT_HightLight);
}
diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
index 14adc7793e..d17a1bab50 100644
--- a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
@@ -23,7 +23,7 @@
#include "xfa/fxfa/parser/xfa_utils.h"
CXFA_ResolveProcessor::CXFA_ResolveProcessor()
- : m_iCurStart(0), m_pNodeHelper(new CXFA_NodeHelper) {}
+ : m_iCurStart(0), m_pNodeHelper(pdfium::MakeUnique<CXFA_NodeHelper>()) {}
CXFA_ResolveProcessor::~CXFA_ResolveProcessor() {}