mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
JANITORIAL: Add comments to explain assertion
This commit is contained in:
parent
fdd9cb2165
commit
c2ab551bad
@ -73,6 +73,9 @@ void GroupedListWidget::setList(const U32StringArray &list, const ColorList *col
|
||||
|
||||
void GroupedListWidget::setAttributeValues(const U32StringArray &attrValues) {
|
||||
_attributeValues = attrValues;
|
||||
// Make sure we always have the attribute values for all the entries of the _dataList.
|
||||
// This is not foolproof, but can prevent accidentally passing attributes for the wrong
|
||||
// list of entries, such as after adding / removing games.
|
||||
if (!attrValues.empty())
|
||||
assert(_attributeValues.size() == _dataList.size());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user