apply some code analyzer recommendations

This commit is contained in:
2024-11-20 20:02:09 +03:00
parent 1becca7519
commit 04b40d367c
9 changed files with 25 additions and 33 deletions

View File

@@ -28,10 +28,10 @@ ContainersModel::ContainersModel() {
void ContainersModel::update(const PIVector<PIIntrospectionContainers::TypeInfo> & t) {
prev_data.clear();
all.fill(0U);
piForeachC(PIIntrospectionContainers::TypeInfo & i, cur_data) {
for (const auto & i: cur_data) {
prev_data[i.id] = i;
}
piForeachC(PIIntrospectionContainers::TypeInfo & i, t) {
for (const auto & i: t) {
all[ccCount] += i.count;
#if PIP_VERSION >= PIP_MAKE_VERSION(2, 35, 0)
all[ccBytesAllocated] += i.allocated_bytes;