[kmymoney] [Bug 495204] huge number of build warnings: declaration of ‘value’ shadows a member of ‘MyMoneyKeyValueContainer’ [-Wshadow]
Ralf Habacker
bugzilla_noreply at kde.org
Tue Oct 22 20:42:44 BST 2024
https://bugs.kde.org/show_bug.cgi?id=495204
--- Comment #2 from Ralf Habacker <ralf.habacker at freenet.de> ---
As far as I can see from the source locations at
1.
https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/mymoney/mymoneykeyvaluecontainer.h#L97
/**
* convenience method for @c enum
*/
template<typename T>
T value(const QString& key, T defaultValue) const
{
return static_cast<T>(value(key, static_cast<int>(defaultValue)));
}
2.
https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/mymoney/mymoneykeyvaluecontainer.h#L117
/**
* convenience method for integral types (except bool)
*/
template<typename T>
void setValue(const QString& key, T value, T defaultValue)
{
return setValue_int(key, static_cast<int>(value),
static_cast<int>(defaultValue));
}
the two templates here have a problem.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the KMyMoney-devel
mailing list