diff options
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlchardata.h')
-rw-r--r-- | core/fxcrt/xml/cfx_xmlchardata.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/fxcrt/xml/cfx_xmlchardata.h b/core/fxcrt/xml/cfx_xmlchardata.h index 013414bc82..9e5669a464 100644 --- a/core/fxcrt/xml/cfx_xmlchardata.h +++ b/core/fxcrt/xml/cfx_xmlchardata.h @@ -25,4 +25,10 @@ class CFX_XMLCharData : public CFX_XMLText { void Save(const RetainPtr<IFX_SeekableWriteStream>& pXMLStream) override; }; +inline CFX_XMLCharData* ToXMLCharData(CFX_XMLNode* pNode) { + return pNode && pNode->GetType() == FX_XMLNODE_CharData + ? static_cast<CFX_XMLCharData*>(pNode) + : nullptr; +} + #endif // CORE_FXCRT_XML_CFX_XMLCHARDATA_H_ |