* style cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42722 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
eaa31a573d
commit
252add8c21
@ -133,7 +133,7 @@ DevicesView::RescanDevices()
|
||||
void
|
||||
DevicesView::DeleteDevices()
|
||||
{
|
||||
while(fDevices.size() > 0) {
|
||||
while (fDevices.size() > 0) {
|
||||
delete fDevices.back();
|
||||
fDevices.pop_back();
|
||||
}
|
||||
@ -149,7 +149,7 @@ DevicesView::CreateCategoryMap()
|
||||
const char* categoryName = kCategoryString[category];
|
||||
|
||||
iter = fCategoryMap.find(category);
|
||||
if( iter == fCategoryMap.end() ) {
|
||||
if (iter == fCategoryMap.end()) {
|
||||
// This category has not yet been added, add it.
|
||||
fCategoryMap[category] = new Device(NULL, BUS_NONE, CAT_NONE,
|
||||
categoryName);
|
||||
@ -162,7 +162,7 @@ void
|
||||
DevicesView::DeleteCategoryMap()
|
||||
{
|
||||
CategoryMapIterator iter;
|
||||
for(iter = fCategoryMap.begin(); iter != fCategoryMap.end(); iter++) {
|
||||
for (iter = fCategoryMap.begin(); iter != fCategoryMap.end(); iter++) {
|
||||
delete iter->second;
|
||||
}
|
||||
fCategoryMap.clear();
|
||||
@ -180,7 +180,7 @@ DevicesView::SortItemsCompare(const BListItem *item1,
|
||||
std::cerr << "Could not cast BListItem to BStringItem, file a bug\n";
|
||||
return 0;
|
||||
}
|
||||
return Compare(stringItem1->Text(),stringItem2->Text());
|
||||
return Compare(stringItem1->Text(), stringItem2->Text());
|
||||
}
|
||||
|
||||
|
||||
@ -198,8 +198,7 @@ DevicesView::RebuildDevicesOutline()
|
||||
AddChildrenToOutlineByConnection(fDevices[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (fOrderBy == ORDER_BY_CATEGORY) {
|
||||
} else if (fOrderBy == ORDER_BY_CATEGORY) {
|
||||
// Add all categories to the outline
|
||||
CategoryMapIterator iter;
|
||||
for (iter = fCategoryMap.begin(); iter != fCategoryMap.end(); iter++) {
|
||||
@ -211,11 +210,11 @@ DevicesView::RebuildDevicesOutline()
|
||||
Category category = fDevices[i]->GetCategory();
|
||||
|
||||
iter = fCategoryMap.find(category);
|
||||
if(iter == fCategoryMap.end()) {
|
||||
std::cerr << "Tried to add device without category, file a bug\n";
|
||||
if (iter == fCategoryMap.end()) {
|
||||
std::cerr
|
||||
<< "Tried to add device without category, file a bug\n";
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
fDevicesOutline->AddUnder(fDevices[i], iter->second);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user