aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/xml-writer.hh
diff options
context:
space:
mode:
authorBen Burdette <bburdette@protonmail.com>2022-04-07 13:42:01 -0600
committerBen Burdette <bburdette@protonmail.com>2022-04-07 13:42:01 -0600
commit1a93ac8133381eb692416c4e46b1706faa5cd89f (patch)
tree9a559f977ad6213c055099f6f2ab6be96f0c551b /src/libutil/xml-writer.hh
parentd2ec9b4e15718e42720787140d7825dcbfd73249 (diff)
parent8b1e328d5d0ae7d3a4a8f6012ec065b59674ed4a (diff)
Merge remote-tracking branch 'upstream/master' into upstream-merge
Diffstat (limited to 'src/libutil/xml-writer.hh')
-rw-r--r--src/libutil/xml-writer.hh14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/libutil/xml-writer.hh b/src/libutil/xml-writer.hh
index b98b44526..4c91adee6 100644
--- a/src/libutil/xml-writer.hh
+++ b/src/libutil/xml-writer.hh
@@ -8,12 +8,8 @@
namespace nix {
-using std::string;
-using std::map;
-using std::list;
-
-typedef map<string, string> XMLAttrs;
+typedef std::map<std::string, std::string> XMLAttrs;
class XMLWriter
@@ -25,7 +21,7 @@ private:
bool indent;
bool closed;
- list<string> pendingElems;
+ std::list<std::string> pendingElems;
public:
@@ -34,11 +30,11 @@ public:
void close();
- void openElement(const string & name,
+ void openElement(std::string_view name,
const XMLAttrs & attrs = XMLAttrs());
void closeElement();
- void writeEmptyElement(const string & name,
+ void writeEmptyElement(std::string_view name,
const XMLAttrs & attrs = XMLAttrs());
private:
@@ -53,7 +49,7 @@ class XMLOpenElement
private:
XMLWriter & writer;
public:
- XMLOpenElement(XMLWriter & writer, const string & name,
+ XMLOpenElement(XMLWriter & writer, std::string_view name,
const XMLAttrs & attrs = XMLAttrs())
: writer(writer)
{