Author: zooey Date: 2010-12-26 15:34:26 +0100 (Sun, 26 Dec 2010) New Revision: 39947 Changeset: http://dev.haiku-os.org/changeset/39947 Modified: haiku/trunk/src/preferences/time/SectionEdit.cpp haiku/trunk/src/preferences/time/SectionEdit.h Log: Fix CID-10224 (uninitialized member in c'tor): * drop fShowFocus, as it is only used in a single method * initialize fHoldValue Modified: haiku/trunk/src/preferences/time/SectionEdit.cpp =================================================================== --- haiku/trunk/src/preferences/time/SectionEdit.cpp 2010-12-26 14:25:05 UTC (rev 39946) +++ haiku/trunk/src/preferences/time/SectionEdit.cpp 2010-12-26 14:34:26 UTC (rev 39947) @@ -55,7 +55,8 @@ 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 @@ 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 Modified: haiku/trunk/src/preferences/time/SectionEdit.h =================================================================== --- haiku/trunk/src/preferences/time/SectionEdit.h 2010-12-26 14:25:05 UTC (rev 39946) +++ haiku/trunk/src/preferences/time/SectionEdit.h 2010-12-26 14:34:26 UTC (rev 39947) @@ -76,8 +76,6 @@ int32 fFocus; uint32 fSectionCount; uint32 fHoldValue; - - bool fShowFocus; };