From e7af3319abdef29be1f35fde62fc38f1b3e727b7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 30 Jan 2025 01:36:17 +0100 Subject: const improvement. --- src/cxml.cc | 2 +- src/cxml.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cxml.cc b/src/cxml.cc index c6ab5cc..2d1f759 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -39,7 +39,7 @@ cxml::Node::Node () } -cxml::Node::Node (xmlpp::Node* node) +cxml::Node::Node(xmlpp::Node const* node) : _node (node) { diff --git a/src/cxml.h b/src/cxml.h index 1dd43cd..3bb28ca 100644 --- a/src/cxml.h +++ b/src/cxml.h @@ -122,7 +122,7 @@ public: * not destroy the xmlpp::Node. * @param node xmlpp::Node. */ - Node (xmlpp::Node* node); + Node(xmlpp::Node const* node); std::string name () const; @@ -229,14 +229,14 @@ public: std::vector> node_children () const; std::vector> node_children (std::string) const; - xmlpp::Node* node () const { + xmlpp::Node const* node() const { return _node; } bool is_text() const; protected: - xmlpp::Node* _node; + xmlpp::Node const* _node; private: mutable std::vector _taken; -- cgit v1.2.3