From 71226d1a8aa193c0d944fb9e96e6ffdf60a1c77c Mon Sep 17 00:00:00 2001 From: Alberto Massari <amassari@apache.org> Date: Fri, 5 Mar 2004 15:55:30 +0000 Subject: [PATCH] The maps inside the DTD are declared of the right type, removing the need for casts git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@175817 13f79535-47bb-0310-9956-ffa450edef68 --- src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp | 16 +++++------ src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp | 28 ++++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp b/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp index a7118fc9a..fd8449ef6 100644 --- a/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp +++ b/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp @@ -240,9 +240,9 @@ DOMDocumentTypeImpl::DOMDocumentTypeImpl(const DOMDocumentTypeImpl &other, bool if ((DOMDocumentImpl *)this->fNode.getOwnerDocument() && deep) fParent.cloneChildren(&other); - fEntities = ((DOMNamedNodeMapImpl *)other.fEntities)->cloneMap(this); - fNotations= ((DOMNamedNodeMapImpl *)other.fNotations)->cloneMap(this); - fElements = ((DOMNamedNodeMapImpl *)other.fElements)->cloneMap(this); + fEntities = other.fEntities->cloneMap(this); + fNotations= other.fNotations->cloneMap(this); + fElements = other.fElements->cloneMap(this); } @@ -285,9 +285,9 @@ void DOMDocumentTypeImpl::setOwnerDocument(DOMDocument *doc) { fNode.setOwnerDocument(doc); fParent.setOwnerDocument(doc); - DOMNamedNodeMap* entitiesTemp = ((DOMNamedNodeMapImpl *)fEntities)->cloneMap(this); - DOMNamedNodeMap* notationsTemp = ((DOMNamedNodeMapImpl *)fNotations)->cloneMap(this); - DOMNamedNodeMap* elementsTemp = ((DOMNamedNodeMapImpl *)fElements)->cloneMap(this); + DOMNamedNodeMapImpl* entitiesTemp = fEntities->cloneMap(this); + DOMNamedNodeMapImpl* notationsTemp = fNotations->cloneMap(this); + DOMNamedNodeMapImpl* elementsTemp = fElements->cloneMap(this); fEntities = entitiesTemp; fNotations = notationsTemp; @@ -342,9 +342,9 @@ void DOMDocumentTypeImpl::setReadOnly(bool readOnl, bool deep) { fNode.setReadOnly(readOnl,deep); if (fEntities) - ((DOMNamedNodeMapImpl *)fEntities)->setReadOnly(readOnl,true); + fEntities->setReadOnly(readOnl,true); if (fNotations) - ((DOMNamedNodeMapImpl *)fNotations)->setReadOnly(readOnl,true); + fNotations->setReadOnly(readOnl,true); } diff --git a/src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp b/src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp index b27a9dbae..9bd9662b2 100644 --- a/src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp +++ b/src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp @@ -81,7 +81,7 @@ XERCES_CPP_NAMESPACE_BEGIN -class NamedNodeMapImpl; +class DOMNamedNodeMapImpl; class CDOM_EXPORT DOMDocumentTypeImpl: public DOMDocumentType { private: @@ -91,21 +91,21 @@ private: - const XMLCh * fName; - DOMNamedNodeMap* fEntities; - DOMNamedNodeMap* fNotations; - DOMNamedNodeMap* fElements; - const XMLCh * fPublicId; - const XMLCh * fSystemId; - const XMLCh * fInternalSubset; + const XMLCh * fName; + DOMNamedNodeMapImpl* fEntities; + DOMNamedNodeMapImpl* fNotations; + DOMNamedNodeMapImpl* fElements; + const XMLCh * fPublicId; + const XMLCh * fSystemId; + const XMLCh * fInternalSubset; - bool fIntSubsetReading; - bool fIsCreatedFromHeap; + bool fIntSubsetReading; + bool fIsCreatedFromHeap; - virtual void setPublicId(const XMLCh * value); - virtual void setSystemId(const XMLCh * value); - virtual void setInternalSubset(const XMLCh *value); - bool isIntSubsetReading() const; + virtual void setPublicId(const XMLCh * value); + virtual void setSystemId(const XMLCh * value); + virtual void setInternalSubset(const XMLCh *value); + bool isIntSubsetReading() const; friend class AbstractDOMParser; -- GitLab