From a31ce6a3cead3afa20fb418c2bafc348b3cc942b Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Sun, 17 Jul 2011 17:30:07 +0000 Subject: [PATCH] Fix "hides overloaded virtual function" warnings in Clang This was SVN commit r9862. --- source/gui/CButton.cpp | 2 +- source/gui/CCheckBox.cpp | 2 +- source/gui/CDropDown.cpp | 2 +- source/gui/CList.cpp | 3 +-- source/gui/CText.cpp | 5 ++--- source/gui/CTooltip.cpp | 3 +-- source/gui/IGUIObject.h | 1 - source/gui/IGUITextOwner.cpp | 3 +-- source/gui/IGUITextOwner.h | 3 +-- 9 files changed, 9 insertions(+), 15 deletions(-) diff --git a/source/gui/CButton.cpp b/source/gui/CButton.cpp index 56db1775cc..e0040b3da4 100644 --- a/source/gui/CButton.cpp +++ b/source/gui/CButton.cpp @@ -116,5 +116,5 @@ void CButton::Draw() cell_id); CColor color = ChooseColor(); - IGUITextOwner::Draw(0, color, m_TextPos, bz+0.1f); + DrawText(0, color, m_TextPos, bz+0.1f); } diff --git a/source/gui/CCheckBox.cpp b/source/gui/CCheckBox.cpp index 3a0788b912..0fb6246781 100644 --- a/source/gui/CCheckBox.cpp +++ b/source/gui/CCheckBox.cpp @@ -175,5 +175,5 @@ void CCheckBox::Draw() if (square_side > line_height) text_pos.y += square_side/2.f - line_height/2.f; - IGUITextOwner::Draw(0, color, text_pos, bz+0.1f, m_CachedActualSize); + DrawText(0, color, text_pos, bz+0.1f, m_CachedActualSize); } diff --git a/source/gui/CDropDown.cpp b/source/gui/CDropDown.cpp index 8f8508c6f8..a7f6f5f704 100644 --- a/source/gui/CDropDown.cpp +++ b/source/gui/CDropDown.cpp @@ -337,7 +337,7 @@ void CDropDown::Draw() m_CachedActualSize.right-button_width, m_CachedActualSize.bottom); CPos pos(m_CachedActualSize.left, m_CachedActualSize.top); - IGUITextOwner::Draw(selected, color, pos, bz+0.1f, cliparea); + DrawText(selected, color, pos, bz+0.1f, cliparea); } bool *scrollbar=NULL, old; diff --git a/source/gui/CList.cpp b/source/gui/CList.cpp index da4954e3bb..d47df7158f 100644 --- a/source/gui/CList.cpp +++ b/source/gui/CList.cpp @@ -401,8 +401,7 @@ void CList::DrawList(const int &selected, cliparea.left = GetScrollBar(0).GetOuterRect().right; } - IGUITextOwner::Draw(i, color, rect.TopLeft() - CPos(0.f, scroll - m_ItemsYPositions[i]), - bz+0.1f, cliparea); + DrawText(i, color, rect.TopLeft() - CPos(0.f, scroll - m_ItemsYPositions[i]), bz+0.1f, cliparea); } } } diff --git a/source/gui/CText.cpp b/source/gui/CText.cpp index fa4d4ef4d8..a2c5d9a299 100644 --- a/source/gui/CText.cpp +++ b/source/gui/CText.cpp @@ -244,11 +244,10 @@ void CText::Draw() CColor color; GUI::GetSetting(this, "textcolor", color); - // Draw text if (scrollbar) - IGUITextOwner::Draw(0, color, m_CachedActualSize.TopLeft() - CPos(0.f, scroll), bz+0.1f, cliparea); + DrawText(0, color, m_CachedActualSize.TopLeft() - CPos(0.f, scroll), bz+0.1f, cliparea); else - IGUITextOwner::Draw(0, color, m_TextPos, bz+0.1f, cliparea); + DrawText(0, color, m_TextPos, bz+0.1f, cliparea); } } diff --git a/source/gui/CTooltip.cpp b/source/gui/CTooltip.cpp index 43ce0bd612..73a6de188d 100644 --- a/source/gui/CTooltip.cpp +++ b/source/gui/CTooltip.cpp @@ -160,7 +160,6 @@ void CTooltip::Draw() CColor color; GUI::GetSetting(this, "textcolor", color); - // Draw text - IGUITextOwner::Draw(0, color, m_CachedActualSize.TopLeft(), z+0.1f); + DrawText(0, color, m_CachedActualSize.TopLeft(), z+0.1f); } } diff --git a/source/gui/IGUIObject.h b/source/gui/IGUIObject.h index acb4dc1a3a..324add9985 100644 --- a/source/gui/IGUIObject.h +++ b/source/gui/IGUIObject.h @@ -583,7 +583,6 @@ class CGUIDummyObject : public IGUIObject public: - virtual void HandleMessage(const SGUIMessage& UNUSED(Message)) {} virtual void Draw() {} // Empty can never be hovered. It is only a category. virtual bool MouseOver() { return false; } diff --git a/source/gui/IGUITextOwner.cpp b/source/gui/IGUITextOwner.cpp index 6244b92112..c8e76577b5 100644 --- a/source/gui/IGUITextOwner.cpp +++ b/source/gui/IGUITextOwner.cpp @@ -78,8 +78,7 @@ void IGUITextOwner::UpdateCachedSize() m_GeneratedTextsValid = false; } -void IGUITextOwner::Draw(const int &index, const CColor &color, const CPos &pos, - const float &z, const CRect &clipping) +void IGUITextOwner::DrawText(int index, const CColor& color, const CPos& pos, float z, const CRect& clipping) { if (!m_GeneratedTextsValid) { diff --git a/source/gui/IGUITextOwner.h b/source/gui/IGUITextOwner.h index 35234e6bf2..dc5cbf422b 100644 --- a/source/gui/IGUITextOwner.h +++ b/source/gui/IGUITextOwner.h @@ -88,8 +88,7 @@ public: * @param clipping Clipping rectangle, don't even add a parameter * to get no clipping. */ - virtual void Draw(const int &index, const CColor &color, const CPos &pos, - const float &z, const CRect &clipping = CRect()); + virtual void DrawText(int index, const CColor& color, const CPos& pos, float z, const CRect& clipping = CRect()); /** * Test if mouse position is over an icon