]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
clang-tidy: Use auto on iterator for loop
authorAxel Viala <axel.viala@darnuria.eu>
Sun, 11 Dec 2022 14:56:06 +0000 (15:56 +0100)
committerAxel Viala <axel.viala@darnuria.eu>
Sat, 24 Dec 2022 13:36:19 +0000 (14:36 +0100)
pdns/zoneparser-tng.cc

index 517c4658ebdaf4a4b43776a24cd80394ae31686a..bf7a519e9ec6e7296f10bfbd0a948655d3e6752a 100644 (file)
@@ -108,7 +108,7 @@ static bool isTimeSpec(const string& nextpart)
 {
   if(nextpart.empty())
     return false;
-  for(string::const_iterator iter = nextpart.begin(); iter != nextpart.end(); ++iter) {
+  for (auto iter = nextpart.begin(); iter != nextpart.end(); ++iter) {
     if(isdigit(*iter))
       continue;
     if(iter+1 != nextpart.end())
@@ -168,9 +168,10 @@ bool ZoneParserTNG::getTemplateLine()
   }
 
   string retline;
-  for(parts_t::const_iterator iter = d_templateparts.begin() ; iter != d_templateparts.end(); ++iter) {
-    if(iter != d_templateparts.begin())
-      retline+=" ";
+  for (auto iter = d_templateparts.begin() ; iter != d_templateparts.end(); ++iter) {
+    if(iter != d_templateparts.begin()) {
+      retline += " ";
+    }
 
     string part=makeString(d_templateline, *iter);