summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Rosen Penev2020-12-21 20:50:51 -0800
committerGravatar Nikias Bassen2021-06-22 01:21:04 +0200
commitd2b9cc8bef501c5a8dc4dc7206d302585906546a (patch)
treea662a5527c4b0e5f6249a2ee9b7d29e6b5e40643 /src
parent8c7e258e80c632c2d1d1eaa93cef8358a898045b (diff)
downloadlibplist-d2b9cc8bef501c5a8dc4dc7206d302585906546a.tar.gz
libplist-d2b9cc8bef501c5a8dc4dc7206d302585906546a.tar.bz2
[clang-tidy] cpp: Use correct type for loop variable
Found with bugprone-too-small-loop-variable Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/Array.cpp6
1 files 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();