From 95cb3db69874e4e9074d7b6264c99d53e1f191fb Mon Sep 17 00:00:00 2001 From: unodgs Date: Thu, 6 Jan 2011 23:46:14 +0000 Subject: [PATCH] TabBar: Mr. Ped fixes (GCC warnings and missing *this) git-svn-id: svn://ultimatepp.org/upp/trunk@2964 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/TabBar/TabBar.cpp | 1 - uppsrc/TabBar/TabBar.h | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/uppsrc/TabBar/TabBar.cpp b/uppsrc/TabBar/TabBar.cpp index a78634322..207beca05 100644 --- a/uppsrc/TabBar/TabBar.cpp +++ b/uppsrc/TabBar/TabBar.cpp @@ -914,7 +914,6 @@ void TabBar::PaintTab(Draw &w, const Size &sz, int n, bool enable, bool dragsamp const Style& s = GetStyle(); int align = GetAlign(); int cnt = dragsample ? 1 : tabs.GetCount(); - int sep = TB_SBSEPARATOR * sc.IsVisible(); bool ac = (n == active && enable); bool hl = (n == highlight && enable) || (stacking && highlight >= 0 && tabs[highlight].stack == t.stack); diff --git a/uppsrc/TabBar/TabBar.h b/uppsrc/TabBar/TabBar.h index d42eccc77..fe68c8b3a 100644 --- a/uppsrc/TabBar/TabBar.h +++ b/uppsrc/TabBar/TabBar.h @@ -25,7 +25,7 @@ public: BOTTOM = 3 }; - AlignedFrame() : border(0), framesize(0), layout(TOP) {} + AlignedFrame() : layout(TOP), framesize(0), border(0) {} virtual void FrameAddSize(Size& sz); virtual void FramePaint(Draw& w, const Rect& r); @@ -176,7 +176,7 @@ public: Vector items; - Tab() : visible(true), id(-1), stack(-1) { } + Tab() : id(-1), stack(-1), visible(true) { } Tab(const Tab& t) { Set(t); } void Set(const Tab& t); @@ -435,10 +435,10 @@ public: bool IsStacking() const { return stacking; } bool IsShowInactive() const { return inactivedisabled; } - TabBar& NeverEmpty() { MinTabCount(1); } + TabBar& NeverEmpty() { return MinTabCount(1); } TabBar& MinTabCount(int cnt) { mintabcount = max(cnt, 0); Refresh(); return *this; } - TabBar& SetDisplay(const Display& d) { display =& d; Refresh(); } + TabBar& SetDisplay(const Display& d) { display =& d; Refresh(); return *this; } TabBar& SetBorder(int border) { AlignedFrame::SetBorder(border); return *this; } int FindKey(const Value& v) const; int FindValue(const Value& v) const;