From 98dc6a20efd8e7b5f0a4b2476c18c982b8cc6e0e Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Thu, 19 Aug 2010 17:41:11 +0000 Subject: [PATCH] * fix 'uninitialized'-warnings in launchpad git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38276 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/launchbox/PadView.cpp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/apps/launchbox/PadView.cpp b/src/apps/launchbox/PadView.cpp index 080e1a22c1..048fbdc4e1 100644 --- a/src/apps/launchbox/PadView.cpp +++ b/src/apps/launchbox/PadView.cpp @@ -40,7 +40,7 @@ PadView::PadView(const char* name) { SetViewColor(B_TRANSPARENT_32_BIT); SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - get_click_speed(&sActivationDelay); + get_click_speed(&sActivationDelay); fButtonLayout->SetInsets(2, 7, 2, 2); SetLayout(fButtonLayout); @@ -91,20 +91,16 @@ PadView::Draw(BRect updateRect) while (current <= stop) { rgb_color col1; rgb_color col2; - switch (num) { - case 1: - col1 = shadow; - col2 = background; - break; - case 2: - col1 = background; - col2 = light; - break; - case 3: - col1 = background; - col2 = background; - num = 0; - break; + if (num == 1) { + col1 = shadow; + col2 = background; + } else if (num == 2) { + col1 = background; + col2 = light; + } else { + col1 = background; + col2 = background; + num = 0; } SetHighColor(col1); StrokeLine(dot, dot, B_SOLID_HIGH); @@ -369,7 +365,7 @@ PadView::DisplayMenu(BPoint where, LaunchButton* button) const message = new BMessage(MSG_SET_ICON_SIZE); message->AddInt32("size", iconSize); BString label; - label << iconSize << " x " << iconSize; + label << iconSize << " x " << iconSize; item = new BMenuItem(label.String(), message); item->SetTarget(this); item->SetMarked(IconSize() == iconSize);