summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/cxfa_textuserdata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/app/cxfa_textuserdata.cpp')
-rw-r--r--xfa/fxfa/app/cxfa_textuserdata.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/xfa/fxfa/app/cxfa_textuserdata.cpp b/xfa/fxfa/app/cxfa_textuserdata.cpp
index 4fdabd6bb3..e436ab2ae9 100644
--- a/xfa/fxfa/app/cxfa_textuserdata.cpp
+++ b/xfa/fxfa/app/cxfa_textuserdata.cpp
@@ -11,22 +11,16 @@
#include "xfa/fde/css/fde_css.h"
#include "xfa/fxfa/app/cxfa_linkuserdata.h"
-CXFA_TextUserData::CXFA_TextUserData(CFDE_CSSComputedStyle* pStyle)
- : m_pStyle(pStyle), m_pLinkData(nullptr), m_dwRefCount(0) {
- if (m_pStyle)
- m_pStyle->Retain();
-}
+CXFA_TextUserData::CXFA_TextUserData(
+ const CFX_RetainPtr<CFDE_CSSComputedStyle>& pStyle)
+ : m_pStyle(pStyle), m_pLinkData(nullptr), m_dwRefCount(0) {}
-CXFA_TextUserData::CXFA_TextUserData(CFDE_CSSComputedStyle* pStyle,
- CXFA_LinkUserData* pLinkData)
- : m_pStyle(pStyle), m_pLinkData(pLinkData), m_dwRefCount(0) {
- if (m_pStyle)
- m_pStyle->Retain();
-}
+CXFA_TextUserData::CXFA_TextUserData(
+ const CFX_RetainPtr<CFDE_CSSComputedStyle>& pStyle,
+ CXFA_LinkUserData* pLinkData)
+ : m_pStyle(pStyle), m_pLinkData(pLinkData), m_dwRefCount(0) {}
CXFA_TextUserData::~CXFA_TextUserData() {
- if (m_pStyle)
- m_pStyle->Release();
if (m_pLinkData)
m_pLinkData->Release();
}