From d2b9cc8bef501c5a8dc4dc7206d302585906546a Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 21 Dec 2020 20:50:51 -0800 Subject: [clang-tidy] cpp: Use correct type for loop variable Found with bugprone-too-small-loop-variable Signed-off-by: Rosen Penev --- src/Array.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Array.cpp b/src/Array.cpp index 8838e5b..65ffaa7 100644 --- a/src/Array.cpp +++ b/src/Array.cpp @@ -61,8 +61,7 @@ Array::Array(const PList::Array& a) Array& Array::operator=(const PList::Array& a) { plist_free(_node); - for (unsigned int it = 0; it < _array.size(); it++) - { + for (size_t it = 0; it < _array.size(); it++) { delete _array.at(it); } _array.clear(); @@ -73,8 +72,7 @@ Array& Array::operator=(const PList::Array& a) Array::~Array() { - for (unsigned int it = 0; it < _array.size(); it++) - { + for (size_t it = 0; it < _array.size(); it++) { delete (_array.at(it)); } _array.clear(); -- cgit v1.1-32-gdbae