Tracker: obligatory round of style fixes

* Explicit NULL checks
* whitespace
* single line if gets no {}'s
*
This commit is contained in:
John Scipione 2014-07-18 10:42:06 -04:00
parent 61dec7d2ec
commit 6527415d5a
3 changed files with 6 additions and 8 deletions

View File

@ -2674,12 +2674,11 @@ BContainerWindow::ShowContextMenu(BPoint loc, const entry_ref* ref, BView*)
PoseView()->ConvertToScreen(&global);
PoseView()->CommitActivePose();
if (ref) {
if (ref != NULL) {
// clicked on a pose, show file or volume context menu
Model model(ref);
if (model.IsTrash()) {
if (fTrashContextMenu->Window() || Dragging())
return;
@ -2693,7 +2692,6 @@ BContainerWindow::ShowContextMenu(BPoint loc, const entry_ref* ref, BView*)
SetupNavigationMenu(ref, fTrashContextMenu);
fTrashContextMenu->Go(global, true, true, true);
} else {
bool showAsVolume = false;
bool filePanel = PoseView()->IsFilePanel();
@ -3072,9 +3070,9 @@ BContainerWindow::BuildMimeTypeList(BObjectList<BString> &mimeTypes)
if (pose->TargetModel()->IsSymLink()) {
Model* resolved = new Model(
pose->TargetModel()->EntryRef(), true, true);
if (resolved->InitCheck() == B_OK) {
if (resolved->InitCheck() == B_OK)
AddMimeTypeString(mimeTypes, resolved);
}
delete resolved;
}
}
@ -3096,7 +3094,7 @@ BContainerWindow::BuildAddOnMenu(BMenu* menu)
return;
menu = item->Submenu();
if (!menu)
if (menu == NULL)
return;
menu->SetFont(be_plain_font);

View File

@ -184,7 +184,7 @@ OpenWithContainerWindow::NewPoseView(Model*, BRect rect, uint32)
OpenWithPoseView*
OpenWithContainerWindow::PoseView() const
{
ASSERT(dynamic_cast<OpenWithPoseView*>(fPoseView));
ASSERT(dynamic_cast<OpenWithPoseView*>(fPoseView) != NULL);
return static_cast<OpenWithPoseView*>(fPoseView);
}

View File

@ -1030,7 +1030,7 @@ TTracker::OpenContainerWindow(Model* model, BMessage* originalRefsList,
if (originalRefsList == NULL) {
// when passing just a single model, stuff it's entry in a single
// element list anyway
ASSERT(model);
ASSERT(model != NULL);
refList = new BMessage;
refList->AddRef("refs", model->EntryRef());
delete model;