Skip to content

Commit

Permalink
cosmetic: place CGUIListItem::SetArt() overloads next to each other
Browse files Browse the repository at this point in the history
  • Loading branch information
Montellese committed Oct 11, 2012
1 parent 534c43e commit 6024a2c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions xbmc/guilib/GUIListItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,19 @@ void CGUIListItem::SetArt(const std::string &type, const std::string &url)
}
}

void CGUIListItem::SetArt(const map<string, string> &art)
{
m_art = art;
// ensure that the fallback "thumb" is available
if (m_art.find("thumb") == m_art.end())
{
if (HasArt("poster"))
m_art["thumb"] = m_art["poster"];
else if (HasArt("banner"))
m_art["thumb"] = m_art["banner"];
}
}

std::string CGUIListItem::GetArt(const std::string &type) const
{
ArtMap::const_iterator i = m_art.find(type);
Expand Down Expand Up @@ -185,19 +198,6 @@ const map<string, string> &CGUIListItem::GetArt() const
return m_art;
}

void CGUIListItem::SetArt(const map<string, string> &art)
{
m_art = art;
// ensure that the fallback "thumb" is available
if (m_art.find("thumb") == m_art.end())
{
if (HasArt("poster"))
m_art["thumb"] = m_art["poster"];
else if (HasArt("banner"))
m_art["thumb"] = m_art["banner"];
}
}

void CGUIListItem::Select(bool bOnOff)
{
m_bSelected = bOnOff;
Expand Down

0 comments on commit 6024a2c

Please sign in to comment.