summaryrefslogtreecommitdiff
path: root/src/cxml.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-08 14:06:26 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-08 14:13:41 +0100
commit3540b3350c6a172b2162c32430248cad2d236898 (patch)
tree5686470dfcd181239e3b6e07e28c3bdec3944eaf /src/cxml.h
parentc336f86b9670c515230767dab9dc56128acf03db (diff)
Use auto.
Diffstat (limited to 'src/cxml.h')
-rw-r--r--src/cxml.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/cxml.h b/src/cxml.h
index d9c8ef6..2bdde74 100644
--- a/src/cxml.h
+++ b/src/cxml.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
This file is part of libcxml.
@@ -21,7 +21,6 @@
#ifndef LIBCXML_CXML_H
#define LIBCXML_CXML_H
-#include <boost/shared_ptr.hpp>
#include <boost/optional.hpp>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string/erase.hpp>
@@ -155,7 +154,7 @@ public:
template <class T>
T number_child (std::string c) const
{
- std::string s = string_child (c);
+ auto s = string_child (c);
boost::erase_all (s, " ");
return raw_convert<T> (s);
}
@@ -163,12 +162,12 @@ public:
template <class T>
boost::optional<T> optional_number_child (std::string c) const
{
- boost::optional<std::string> s = optional_string_child (c);
+ auto s = optional_string_child (c);
if (!s) {
return boost::optional<T> ();
}
- std::string t = s.get ();
+ auto t = s.get ();
boost::erase_all (t, " ");
return raw_convert<T> (t);
}
@@ -202,12 +201,12 @@ public:
template <class T>
boost::optional<T> optional_number_attribute (std::string c) const
{
- boost::optional<std::string> s = optional_string_attribute (c);
+ auto s = optional_string_attribute (c);
if (!s) {
return boost::optional<T> ();
}
- std::string t = s.get ();
+ auto t = s.get ();
boost::erase_all (t, " ");
return raw_convert<T> (t);
}