* style cleanup

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