diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-07-03 19:12:34 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-03 19:12:34 +0000 |
commit | 95b0293a29b235c746db0f01c8462ca89d7a814e (patch) | |
tree | ed5e19f83b4e5d0e90bac2c0764175a8ed7a5b8f /xfa/fxfa/parser/cxfa_localevalue.h | |
parent | d96fa3b42797332ab53c05b8e6b6357676838e55 (diff) | |
download | pdfium-95b0293a29b235c746db0f01c8462ca89d7a814e.tar.xz |
Use more UnowendPtr<> in cfgas_formatstring.h and cfx_break.h
Move initializers to .h file (proves none missing).
Change-Id: Iff8fe76e46634aa32a32ecd592476594a9d1bafa
Reviewed-on: https://pdfium-review.googlesource.com/36950
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_localevalue.h')
-rw-r--r-- | xfa/fxfa/parser/cxfa_localevalue.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/cxfa_localevalue.h b/xfa/fxfa/parser/cxfa_localevalue.h index cedea10b10..c6f9c1ee98 100644 --- a/xfa/fxfa/parser/cxfa_localevalue.h +++ b/xfa/fxfa/parser/cxfa_localevalue.h @@ -9,6 +9,7 @@ #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" +#include "core/fxcrt/unowned_ptr.h" #include "xfa/fxfa/parser/cxfa_node.h" class LocaleIface; @@ -28,7 +29,6 @@ class CXFA_LocaleMgr; class CXFA_LocaleValue { public: CXFA_LocaleValue(); - CXFA_LocaleValue(const CXFA_LocaleValue& value); CXFA_LocaleValue(uint32_t dwType, CXFA_LocaleMgr* pLocaleMgr); CXFA_LocaleValue(uint32_t dwType, const WideString& wsValue, @@ -38,8 +38,10 @@ class CXFA_LocaleValue { const WideString& wsFormat, LocaleIface* pLocale, CXFA_LocaleMgr* pLocaleMgr); + CXFA_LocaleValue(const CXFA_LocaleValue& that); ~CXFA_LocaleValue(); - CXFA_LocaleValue& operator=(const CXFA_LocaleValue& value); + + CXFA_LocaleValue& operator=(const CXFA_LocaleValue& that); bool ValidateValue(const WideString& wsValue, const WideString& wsPattern, @@ -56,6 +58,7 @@ class CXFA_LocaleValue { const WideString& wsFormat, LocaleIface* pLocale); + bool IsValid() const { return m_bValid; } WideString GetValue() const { return m_wsValue; } uint32_t GetType() const { return m_dwType; } double GetDoubleNum() const; @@ -63,8 +66,6 @@ class CXFA_LocaleValue { CFX_DateTime GetDate() const; CFX_DateTime GetTime() const; - bool IsValid() const { return m_bValid; } - private: bool FormatSinglePattern(WideString& wsResult, const WideString& wsFormat, @@ -81,10 +82,10 @@ class CXFA_LocaleValue { const WideString& wsPattern, LocaleIface* pLocale); - CXFA_LocaleMgr* m_pLocaleMgr; + UnownedPtr<CXFA_LocaleMgr> m_pLocaleMgr; WideString m_wsValue; - uint32_t m_dwType; - bool m_bValid; + uint32_t m_dwType = XFA_VT_NULL; + bool m_bValid = true; }; #endif // XFA_FXFA_PARSER_CXFA_LOCALEVALUE_H_ |