summaryrefslogtreecommitdiff
path: root/src/cxml.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-07-02 21:57:31 +0200
committerCarl Hetherington <cth@carlh.net>2023-07-02 21:57:31 +0200
commit7381b197f721e4e38ead259ea5811aab8344f7fe (patch)
tree47dd57c413623e30aaa7f48890c8ce9dc1e80c09 /src/cxml.cc
parent4cbe0bc744a18f385f85eee2c2e3dbb30b9358df (diff)
Cleanup: use some make_shared.
Diffstat (limited to 'src/cxml.cc')
-rw-r--r--src/cxml.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cxml.cc b/src/cxml.cc
index c2d8534..b065b37 100644
--- a/src/cxml.cc
+++ b/src/cxml.cc
@@ -24,11 +24,14 @@
#include <boost/algorithm/string.hpp>
#include <cstdio>
+
+using std::make_shared;
using std::shared_ptr;
using std::string;
using std::vector;
using boost::optional;
+
cxml::Node::Node ()
: _node (nullptr)
{
@@ -85,7 +88,7 @@ cxml::Node::node_children () const
vector<shared_ptr<cxml::Node>> n;
for (auto i: _node->get_children()) {
- n.push_back (shared_ptr<Node> (new Node (i)));
+ n.push_back(make_shared<Node>(i));
}
return n;
@@ -105,7 +108,7 @@ cxml::Node::node_children (string name) const
vector<shared_ptr<cxml::Node>> n;
for (auto i: _node->get_children()) {
if (i->get_name() == name) {
- n.push_back (shared_ptr<Node> (new Node (i)));
+ n.push_back(make_shared<Node>(i));
}
}