mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 14:12:31 +00:00
clang-tidy: convert loops to range based
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Jari Sundell
parent
bb8d677f6e
commit
0948b5f86a
+4
-4
@@ -455,8 +455,8 @@ print_object(char* first, char* last, const torrent::Object* src, int flags) {
|
||||
if (first != last)
|
||||
*first = '\0';
|
||||
|
||||
for (torrent::Object::list_const_iterator itr = src->as_list().begin(), itrEnd = src->as_list().end(); itr != itrEnd; itr++) {
|
||||
first = print_object(first, last, &*itr, flags);
|
||||
for (const auto& itr : src->as_list()) {
|
||||
first = print_object(first, last, &itr, flags);
|
||||
|
||||
// Don't expand tilde after the first element in the list.
|
||||
flags &= ~print_expand_tilde;
|
||||
@@ -497,8 +497,8 @@ print_object_std(std::string* dest, const torrent::Object* src, int flags) {
|
||||
return;
|
||||
}
|
||||
case torrent::Object::TYPE_LIST:
|
||||
for (torrent::Object::list_const_iterator itr = src->as_list().begin(), itrEnd = src->as_list().end(); itr != itrEnd; itr++) {
|
||||
print_object_std(dest, &*itr, flags);
|
||||
for (const auto& itr : src->as_list()) {
|
||||
print_object_std(dest, &itr, flags);
|
||||
|
||||
// Don't expand tilde after the first element in the list.
|
||||
flags &= ~print_expand_tilde;
|
||||
|
||||
Reference in New Issue
Block a user