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 <a.samirh78@gmail.com> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
3347432bee
commit
365dd7d14c
@ -164,7 +164,6 @@ template <int Idx, typename T> 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 <int... Idx, typename... T> struct UintDataStorage<std::integer_sequenc
|
||||
};
|
||||
(void) dummy;
|
||||
}
|
||||
|
||||
static constexpr int metaTypeCount()
|
||||
{
|
||||
// same as:
|
||||
// return (0 + ... + UintDataEntry<Idx, T>::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<Idx, T>::metaTypeCount()... };
|
||||
for (int n : counts)
|
||||
total += n;
|
||||
return total;
|
||||
}
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user