Skip to content

Commit

Permalink
alternate fix for uninitialized variable in CGUILabel
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Marshall committed Jul 23, 2011
1 parent 2f93fd9 commit 40499ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
15 changes: 8 additions & 7 deletions xbmc/guilib/GUILabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@
#include <limits>

CGUILabel::CGUILabel(float posX, float posY, float width, float height, const CLabelInfo& labelInfo, CGUILabel::OVER_FLOW overflow)
: m_textLayout(labelInfo.font, overflow == OVER_FLOW_WRAP, height)
: m_label(labelInfo)
, m_textLayout(labelInfo.font, overflow == OVER_FLOW_WRAP, height)
, m_scrolling(overflow == OVER_FLOW_SCROLL)
, m_overflowType(overflow)
, m_selected(false)
, m_scrollInfo(50, 0, labelInfo.scrollSpeed, labelInfo.scrollSuffix)
, m_renderRect()
, m_maxRect(posX, posY, posX + width, posY + height)
, m_color(COLOR_UNKNOWN)
, m_invalid(true)
, m_color(COLOR_TEXT)
{
m_selected = false;
m_overflowType = overflow;
m_scrolling = (overflow == OVER_FLOW_SCROLL);
m_label = labelInfo;
m_invalid = true;
}

CGUILabel::~CGUILabel(void)
Expand Down
3 changes: 1 addition & 2 deletions xbmc/guilib/GUILabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ class CGUILabel
enum COLOR { COLOR_TEXT = 0,
COLOR_SELECTED,
COLOR_FOCUSED,
COLOR_DISABLED,
COLOR_UNKNOWN };
COLOR_DISABLED };

/*! \brief allowed overflow handling techniques for labels, as defined by the skin
*/
Expand Down

0 comments on commit 40499ec

Please sign in to comment.