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
This commit is contained in:
Oliver Tappe 2010-12-26 14:34:26 +00:00
parent 4a08647e39
commit 420e9637fe
2 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -76,8 +76,6 @@ protected:
int32 fFocus;
uint32 fSectionCount;
uint32 fHoldValue;
bool fShowFocus;
};