[Core] TraitsData::getTraitProperty
should not be [[nodiscard]]
#825
Labels
TraitsData::getTraitProperty
should not be [[nodiscard]]
#825
What
Remove
[[nodiscard]]
attribute fromTraitsData::getTraitProperty
,or otherwise redesigngetTraitProperty
.Why
The design of
getTraitProperty
uses an out-parameter for the value the user is most interested in. The return value is abool
indicating whether the property is set. A possible valid use case is ignoring the return value, e.g. in a "value or default" flow:where
value
will be the stored value if set, or will remain "fallback" if not. In this case, the returnedbool
is not interesting and can be safely ignored.The text was updated successfully, but these errors were encountered: