From 365dd7d14c2e0718568352ea4c5faa2c04f4fb58 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 18 Nov 2024 23:17:45 -0800 Subject: [PATCH] QtMocHelpers: remove unused metaTypeCount() functions Only UintData::metaTypeCount() is used and it calls directly MetaTypeList::count(). These two did not compile if one attempted to instantiate them. Change-Id: I5815d042d9019b29fff3fffd8a17841704d2e1c2 Reviewed-by: Ahmad Samir Reviewed-by: Ivan Solovev --- src/corelib/kernel/qtmochelpers.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/corelib/kernel/qtmochelpers.h b/src/corelib/kernel/qtmochelpers.h index fda7d2415a9..75aa553b39f 100644 --- a/src/corelib/kernel/qtmochelpers.h +++ b/src/corelib/kernel/qtmochelpers.h @@ -164,7 +164,6 @@ template struct UintDataEntry { T entry; constexpr UintDataEntry(T &&entry_) : entry(std::move(entry_)) {} - static constexpr int metaTypeCount() { return decltype(T::metaTypes())::Count; } }; // This storage type is designed similar to libc++'s std::tuple, in that it @@ -191,19 +190,6 @@ template struct UintDataStorage::metaTypeCount()); - // but not using the fold expression to avoid exceeding compiler limits - // (calculation done using int to get compile-time overflow checking) - int total = 0; - int counts[] = { 0, UintDataEntry::metaTypeCount()... }; - for (int n : counts) - total += n; - return total; - } }; } // namespace detail