From 9d87348260316af729892c58bc29f159a173abf1 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Tue, 23 Feb 2021 00:37:11 +0200 Subject: Minor code optimisation - Use more range-for loops where appropriate - Use auto instead of the usually-long iterator type names - Use cbegin/cend(), to match the std:: containers, less confusion - Use qDeleteAll instead of a for loop - Make a QRE with a long-ish pattern static NO_CHANGELOG --- src/core/kcoreconfigskeleton_p.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/core/kcoreconfigskeleton_p.h') diff --git a/src/core/kcoreconfigskeleton_p.h b/src/core/kcoreconfigskeleton_p.h index d854cc43..a7417430 100644 --- a/src/core/kcoreconfigskeleton_p.h +++ b/src/core/kcoreconfigskeleton_p.h @@ -21,10 +21,7 @@ public: } ~KCoreConfigSkeletonPrivate() { - KConfigSkeletonItem::List::ConstIterator it; - for (it = mItems.constBegin(); it != mItems.constEnd(); ++it) { - delete *it; - } + qDeleteAll(mItems); } QString mCurrentGroup; -- cgit v1.2.1