From 01f35d103ff2a09e9e1daced8452940cc9a94685 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Sun, 14 Apr 2013 13:24:32 -0400 Subject: [PATCH] Style fixes to TeamMenu --- src/apps/deskbar/TeamMenu.cpp | 5 +++-- src/apps/deskbar/TeamMenuItem.cpp | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/apps/deskbar/TeamMenu.cpp b/src/apps/deskbar/TeamMenu.cpp index 50aa6c1bb4..80a1fa0c2c 100644 --- a/src/apps/deskbar/TeamMenu.cpp +++ b/src/apps/deskbar/TeamMenu.cpp @@ -50,7 +50,8 @@ All rights reserved. TTeamMenu::TTeamMenu() - : BMenu("Team Menu") + : + BMenu("Team Menu") { SetItemMargins(0.0f, 0.0f, 0.0f, 0.0f); SetFont(be_plain_font); @@ -133,7 +134,7 @@ void TTeamMenu::DetachedFromWindow() { TBarView* barView = (dynamic_cast(be_app))->BarView(); - if (barView) { + if (barView != NULL) { BLooper* looper = barView->Looper(); if (looper->Lock()) { barView->DragStop(); diff --git a/src/apps/deskbar/TeamMenuItem.cpp b/src/apps/deskbar/TeamMenuItem.cpp index 7c5d42f2ce..8acb8bb6e3 100644 --- a/src/apps/deskbar/TeamMenuItem.cpp +++ b/src/apps/deskbar/TeamMenuItem.cpp @@ -67,14 +67,16 @@ const float kSwitchWidth = 12; TTeamMenuItem::TTeamMenuItem(BList* team, BBitmap* icon, char* name, char* sig, float width, float height, bool drawLabel, bool vertical) - : BMenuItem(new TWindowMenu(team, sig)) + : + BMenuItem(new TWindowMenu(team, sig)) { _InitData(team, icon, name, sig, width, height, drawLabel, vertical); } TTeamMenuItem::TTeamMenuItem(float width, float height, bool vertical) - : BMenuItem("", NULL) + : + BMenuItem("", NULL) { _InitData(NULL, NULL, strdup(""), strdup(""), width, height, false, vertical); @@ -156,7 +158,7 @@ TTeamMenuItem::GetContentSize(float* width, float* height) { BRect iconBounds; - if (fIcon) + if (fIcon != NULL) iconBounds = fIcon->Bounds(); else iconBounds = BRect(0, 0, kMinimumIconSize - 1, kMinimumIconSize - 1);