GUI: Move variable declaration to the initialization
This commit is contained in:
parent
0d954b5680
commit
4559ad8f90
2 changed files with 2 additions and 4 deletions
|
@ -464,7 +464,6 @@ void GridWidget::groupEntries() {
|
||||||
_itemsInGroup.clear();
|
_itemsInGroup.clear();
|
||||||
|
|
||||||
for (uint i = 0; i < _dataEntryList.size(); ++i) {
|
for (uint i = 0; i < _dataEntryList.size(); ++i) {
|
||||||
int groupID;
|
|
||||||
U32String attrVal = _dataEntryList[i].attribute;
|
U32String attrVal = _dataEntryList[i].attribute;
|
||||||
if (!_groupValueIndex.contains(attrVal)) {
|
if (!_groupValueIndex.contains(attrVal)) {
|
||||||
int newGroupID = _groupValueIndex.size();
|
int newGroupID = _groupValueIndex.size();
|
||||||
|
@ -472,7 +471,7 @@ void GridWidget::groupEntries() {
|
||||||
_groupHeaders.push_back(attrVal);
|
_groupHeaders.push_back(attrVal);
|
||||||
_groupExpanded.push_back(true);
|
_groupExpanded.push_back(true);
|
||||||
}
|
}
|
||||||
groupID = _groupValueIndex.getVal(attrVal);
|
int groupID = _groupValueIndex.getVal(attrVal);
|
||||||
|
|
||||||
_itemsInGroup[groupID].push_back(i);
|
_itemsInGroup[groupID].push_back(i);
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,6 @@ void GroupedListWidget::groupByAttribute() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint i = 0; i < _dataList.size(); ++i) {
|
for (uint i = 0; i < _dataList.size(); ++i) {
|
||||||
int groupID;
|
|
||||||
U32StringArray::iterator attrVal = _attributeValues.begin() + i;
|
U32StringArray::iterator attrVal = _attributeValues.begin() + i;
|
||||||
if (!_groupValueIndex.contains(*attrVal)) {
|
if (!_groupValueIndex.contains(*attrVal)) {
|
||||||
int newGroupID = _groupValueIndex.size();
|
int newGroupID = _groupValueIndex.size();
|
||||||
|
@ -129,7 +128,7 @@ void GroupedListWidget::groupByAttribute() {
|
||||||
_groupHeaders.push_back(*attrVal);
|
_groupHeaders.push_back(*attrVal);
|
||||||
_groupExpanded.push_back(true);
|
_groupExpanded.push_back(true);
|
||||||
}
|
}
|
||||||
groupID = _groupValueIndex.getVal(*attrVal);
|
int groupID = _groupValueIndex.getVal(*attrVal);
|
||||||
|
|
||||||
_itemsInGroup[groupID].push_back(i);
|
_itemsInGroup[groupID].push_back(i);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue