From 420e9637fe7b37ae6600bc9e08164ab7e5f6c975 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 26 Dec 2010 14:34:26 +0000 Subject: [PATCH] Fix CID-10224 (uninitialized member in c'tor): * drop fShowFocus, as it is only used in a single method * initialize fHoldValue git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39947 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/time/SectionEdit.cpp | 7 ++++--- src/preferences/time/SectionEdit.h | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/preferences/time/SectionEdit.cpp b/src/preferences/time/SectionEdit.cpp index a7b1ce1bcd..9dd0a32f7b 100644 --- a/src/preferences/time/SectionEdit.cpp +++ b/src/preferences/time/SectionEdit.cpp @@ -55,7 +55,8 @@ TSectionEdit::TSectionEdit(BRect frame, const char* name, uint32 sections) BControl(frame, name, NULL, NULL, B_FOLLOW_NONE, B_NAVIGABLE | B_WILL_DRAW), fSectionList(NULL), fFocus(-1), - fSectionCount(sections) + fSectionCount(sections), + fHoldValue(0) { InitView(); } @@ -204,10 +205,10 @@ void TSectionEdit::DrawBorder(const BRect& updateRect) { BRect bounds(Bounds()); - fShowFocus = (IsFocus() && Window() && Window()->IsActive()); + bool showFocus = (IsFocus() && Window() && Window()->IsActive()); be_control_look->DrawBorder(this, bounds, updateRect, ViewColor(), - B_FANCY_BORDER, fShowFocus ? BControlLook::B_FOCUSED : 0); + B_FANCY_BORDER, showFocus ? BControlLook::B_FOCUSED : 0); // draw up/down control diff --git a/src/preferences/time/SectionEdit.h b/src/preferences/time/SectionEdit.h index 9e3903633d..96bf78e06c 100644 --- a/src/preferences/time/SectionEdit.h +++ b/src/preferences/time/SectionEdit.h @@ -76,8 +76,6 @@ protected: int32 fFocus; uint32 fSectionCount; uint32 fHoldValue; - - bool fShowFocus; };