about summary refs log tree commit diff
path: root/third_party/nix/src/libutil/xml-writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libutil/xml-writer.cc')
-rw-r--r--third_party/nix/src/libutil/xml-writer.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/third_party/nix/src/libutil/xml-writer.cc b/third_party/nix/src/libutil/xml-writer.cc
index ed41286cc1a3..11cd632399ad 100644
--- a/third_party/nix/src/libutil/xml-writer.cc
+++ b/third_party/nix/src/libutil/xml-writer.cc
@@ -1,6 +1,6 @@
 #include "xml-writer.hh"
 
-#include <assert.h>
+#include <cassert>
 
 namespace nix {
 
@@ -68,8 +68,7 @@ void XMLWriter::writeEmptyElement(const string& name, const XMLAttrs& attrs) {
 void XMLWriter::writeAttrs(const XMLAttrs& attrs) {
   for (auto& i : attrs) {
     output << " " << i.first << "=\"";
-    for (size_t j = 0; j < i.second.size(); ++j) {
-      char c = i.second[j];
+    for (char c : i.second) {
       if (c == '"') {
         output << "&quot;";
       } else if (c == '<') {