Code

use smart pointer types correctly
authorishmal <ishmal@users.sourceforge.net>
Mon, 12 May 2008 21:31:27 +0000 (21:31 +0000)
committerishmal <ishmal@users.sourceforge.net>
Mon, 12 May 2008 21:31:27 +0000 (21:31 +0000)
src/dom/svgreader.cpp

index fb4b3c62ed7c3a78df869c19a6a514b7690d590f..1ec85bcca924381b32a5d986449e88b265d1962c 100644 (file)
@@ -762,8 +762,8 @@ SVGDocumentPtr SVGReader::parse(const DocumentPtr src)
     DOMImplementationImpl impl;
     doc = new SVGDocumentImpl(&impl, SVG_NAMESPACE, "svg" , NULL);
 
-    SVGElementImplPtr destElem = dynamic_cast<SVGElementImpl *>(doc->getRootElement().get());
-    ElementImplPtr    srcElem  = dynamic_cast<ElementImpl *>(src->getDocumentElement().get());
+    SVGElementImplPtr destElem = dynamic_pointer_cast<SVGElementImpl, SVGElement>(doc->getRootElement());
+    ElementImplPtr    srcElem  = dynamic_pointer_cast<ElementImpl, Element>(src->getDocumentElement());
     if (!parseElement(destElem, srcElem))
         {
         return NULL;