Remove redundant IGUITextOwner::AddText IGUIObject/this argument.

Differential Revision: https://code.wildfiregames.com/D2333
Tested on: clang 8.0.1., Jenkins/vs2015

This was SVN commit r23009.
This commit is contained in:
elexis 2019-09-28 11:46:06 +00:00
parent b097f38a79
commit 52b7fd5cd9
6 changed files with 10 additions and 10 deletions

View File

@ -274,7 +274,7 @@ CSize CChart::AddFormattedValue(const CStrW& format, const float value, const CS
return CSize();
}
return AddText(gui_str, font, 0, buffer_zone, this).GetSize();
return AddText(gui_str, font, 0, buffer_zone).GetSize();
}
void CChart::UpdateBounds()

View File

@ -164,7 +164,7 @@ public:
* @param pObject Optional parameter for error output. Used *only* if error parsing fails,
* and we need to be able to output which object the error occurred in to aid the user.
*/
CGUIText(const CGUI& pGUI, const CGUIString& string, const CStrW& FontW, const float Width, const float BufferZone, const IGUIObject* pObject = nullptr);
CGUIText(const CGUI& pGUI, const CGUIString& string, const CStrW& FontW, const float Width, const float BufferZone, const IGUIObject* pObject);
/**
* Draw this CGUIText object

View File

@ -110,13 +110,13 @@ void CList::SetupText()
CGUIText* text;
if (!m_List.m_Items[i].GetOriginalString().empty())
text = &AddText(m_List.m_Items[i], m_Font, width, m_BufferZone, this);
text = &AddText(m_List.m_Items[i], m_Font, width, m_BufferZone);
else
{
// Minimum height of a space character of the current font size
CGUIString align_string;
align_string.SetValue(L" ");
text = &AddText(align_string, m_Font, width, m_BufferZone, this);
text = &AddText(align_string, m_Font, width, m_BufferZone);
}
m_ItemsYPositions[i] = buffered_y;

View File

@ -74,7 +74,7 @@ void COList::SetupText()
CGUIString gui_string;
gui_string.SetValue(column.m_Heading);
const CGUIText& text = AddText(gui_string, m_Font, width, m_BufferZone, this);
const CGUIText& text = AddText(gui_string, m_Font, width, m_BufferZone);
m_HeadingHeight = std::max(m_HeadingHeight, text.GetSize().cy + COLUMN_SHIFT.y);
}
@ -93,13 +93,13 @@ void COList::SetupText()
CGUIText* text;
if (!column.m_List.m_Items[i].GetOriginalString().empty())
text = &AddText(column.m_List.m_Items[i], m_Font, width, m_BufferZone, this);
text = &AddText(column.m_List.m_Items[i], m_Font, width, m_BufferZone);
else
{
// Minimum height of a space character of the current font size
CGUIString align_string;
align_string.SetValue(L" ");
text = &AddText(align_string, m_Font, width, m_BufferZone, this);
text = &AddText(align_string, m_Font, width, m_BufferZone);
}
shift = std::max(shift, text->GetSize().cy);
}

View File

@ -48,10 +48,10 @@ CGUIText& IGUITextOwner::AddText()
return m_GeneratedTexts.back();
}
CGUIText& IGUITextOwner::AddText(const CGUIString& Text, const CStrW& Font, const float& Width, const float& BufferZone, const IGUIObject* pObject)
CGUIText& IGUITextOwner::AddText(const CGUIString& Text, const CStrW& Font, const float& Width, const float& BufferZone)
{
// Avoids a move constructor
m_GeneratedTexts.emplace_back(m_pGUI, Text, Font, Width, BufferZone, pObject);
m_GeneratedTexts.emplace_back(m_pGUI, Text, Font, Width, BufferZone, this);
return m_GeneratedTexts.back();
}

View File

@ -58,7 +58,7 @@ public:
/**
* Adds a text generated by the given arguments.
*/
CGUIText& AddText(const CGUIString& Text, const CStrW& Font, const float& Width, const float& BufferZone, const IGUIObject* pObject = nullptr);
CGUIText& AddText(const CGUIString& Text, const CStrW& Font, const float& Width, const float& BufferZone);
/**
* Subscribe the custom JS methods.