diff options
Diffstat (limited to 'src/uscxml/util')
-rw-r--r-- | src/uscxml/util/DOM.cpp | 4 | ||||
-rw-r--r-- | src/uscxml/util/DOM.h | 2 | ||||
-rw-r--r-- | src/uscxml/util/URL.cpp | 4 | ||||
-rw-r--r-- | src/uscxml/util/URL.h | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/uscxml/util/DOM.cpp b/src/uscxml/util/DOM.cpp index 0e1e9fa..ecf0960 100644 --- a/src/uscxml/util/DOM.cpp +++ b/src/uscxml/util/DOM.cpp @@ -194,12 +194,12 @@ bool DOMUtils::isMember(const DOMElement* node, return false; } -const DOMNode* DOMUtils::getNearestAncestor(const DOMNode* node, const std::string tagName) { +const DOMElement* DOMUtils::getNearestAncestor(const DOMNode* node, const std::string tagName) { const DOMNode* parent = node->getParentNode(); while(parent) { if (parent->getNodeType() == DOMNode::ELEMENT_NODE && iequals(TAGNAME_CAST(parent), tagName)) { - return parent; + return static_cast<const DOMElement*>(parent); } parent = parent->getParentNode(); } diff --git a/src/uscxml/util/DOM.h b/src/uscxml/util/DOM.h index 0e8621c..f259ea0 100644 --- a/src/uscxml/util/DOM.h +++ b/src/uscxml/util/DOM.h @@ -59,7 +59,7 @@ namespace uscxml { class USCXML_API DOMUtils { public: - static const XERCESC_NS::DOMNode* getNearestAncestor(const XERCESC_NS::DOMNode* node, const std::string tagName); + static const XERCESC_NS::DOMElement* getNearestAncestor(const XERCESC_NS::DOMNode* node, const std::string tagName); static bool isDescendant(const XERCESC_NS::DOMNode* s1, const XERCESC_NS::DOMNode* s2); diff --git a/src/uscxml/util/URL.cpp b/src/uscxml/util/URL.cpp index 561b9aa..a76c772 100644 --- a/src/uscxml/util/URL.cpp +++ b/src/uscxml/util/URL.cpp @@ -144,9 +144,9 @@ URL URLImpl::resolveWithCWD(URLImpl* relative) { #if WIN32 std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string(currPath))); #else - std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string("file://") + currPath + PATH_SEPERATOR)); + std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string("file://") + currPath + PATH_SEPERATOR)); #endif - + return resolve(relative, cwdURL.get()); } diff --git a/src/uscxml/util/URL.h b/src/uscxml/util/URL.h index dba8e3d..8127892 100644 --- a/src/uscxml/util/URL.h +++ b/src/uscxml/util/URL.h @@ -191,7 +191,7 @@ protected: class USCXML_API URL { public: PIMPL_OPERATORS(URL); - + URL(const std::string url) : _impl(new URLImpl(url)) {} bool isAbsolute() { |