From: Axel Viala Date: Sun, 11 Dec 2022 14:56:06 +0000 (+0100) Subject: clang-tidy: Use auto on iterator for loop X-Git-Tag: dnsdist-1.8.0-rc1~140^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=78924ce1bedd905c78f722f11f5d96d045202c36;p=thirdparty%2Fpdns.git clang-tidy: Use auto on iterator for loop --- diff --git a/pdns/zoneparser-tng.cc b/pdns/zoneparser-tng.cc index 517c4658eb..bf7a519e9e 100644 --- a/pdns/zoneparser-tng.cc +++ b/pdns/zoneparser-tng.cc @@ -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);