Beispiel #1
0
void
Variable::merge( const Variable &other )
{
	addIfMissing( other.myValues );
	for ( auto i: other.mySystemValues )
		addIfMissingSystem( i.first, i.second );

	myCachedValue.clear();
	myCachedSystem.clear();
}
    void onAlbEventStart(const QXmlAttributes& attrs)
    {
        string strDate (convStr(attrs.value("date")));
        if (!strDate.empty())
        {
            m_albumInfo.m_strReleased = m_albumInfo.m_strReleased.empty() ? strDate : min(m_albumInfo.m_strReleased, strDate);
        }

        string strFormat (convStr(attrs.value("format")));
        if (!strFormat.empty() && string::npos == m_albumInfo.m_strFormat.find(strFormat))
        {
            addIfMissing(m_albumInfo.m_strFormat, strFormat);
        }
    }
Beispiel #3
0
void
Variable::addIfMissing( const std::vector<std::string> &v )
{
	for ( const std::string &i: v )
		addIfMissing( i );
}