Convert to range-based for (#1104)

Found with MSVC: warning C4456

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2023-08-05 08:00:07 -07:00 committed by GitHub
parent bd6c3ba174
commit bec59b4b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -334,16 +334,13 @@ ByteVector TableOfContentsFrame::renderFields() const
flags += 1;
data.append(flags);
data.append(static_cast<char>(entryCount()));
auto it = d->childElements.cbegin();
while(it != d->childElements.cend()) {
data.append(*it);
for(const auto &element : d->childElements) {
data.append(element);
data.append('\0');
it++;
}
const FrameList l = d->embeddedFrameList;
for(auto it = l.begin(); it != l.end(); ++it) {
(*it)->header()->setVersion(header()->version());
data.append((*it)->render());
for(const auto &frame : d->embeddedFrameList) {
frame->header()->setVersion(header()->version());
data.append(frame->render());
}
return data;