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:
@@ -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),
|
BControl(frame, name, NULL, NULL, B_FOLLOW_NONE, B_NAVIGABLE | B_WILL_DRAW),
|
||||||
fSectionList(NULL),
|
fSectionList(NULL),
|
||||||
fFocus(-1),
|
fFocus(-1),
|
||||||
fSectionCount(sections)
|
fSectionCount(sections),
|
||||||
|
fHoldValue(0)
|
||||||
{
|
{
|
||||||
InitView();
|
InitView();
|
||||||
}
|
}
|
||||||
@@ -204,10 +205,10 @@ void
|
|||||||
TSectionEdit::DrawBorder(const BRect& updateRect)
|
TSectionEdit::DrawBorder(const BRect& updateRect)
|
||||||
{
|
{
|
||||||
BRect bounds(Bounds());
|
BRect bounds(Bounds());
|
||||||
fShowFocus = (IsFocus() && Window() && Window()->IsActive());
|
bool showFocus = (IsFocus() && Window() && Window()->IsActive());
|
||||||
|
|
||||||
be_control_look->DrawBorder(this, bounds, updateRect, ViewColor(),
|
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
|
// draw up/down control
|
||||||
|
|
||||||
|
|||||||
@@ -76,8 +76,6 @@ protected:
|
|||||||
int32 fFocus;
|
int32 fFocus;
|
||||||
uint32 fSectionCount;
|
uint32 fSectionCount;
|
||||||
uint32 fHoldValue;
|
uint32 fHoldValue;
|
||||||
|
|
||||||
bool fShowFocus;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user