tdf#158237 Use C++20 contains() instead of find() and end()

Change-Id: Ib0ed8868b94c1470768a95fb26767cf25fe4bf8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177028
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Simon Chenery 2024-11-22 13:46:53 +01:00 committed by Julien Nabet
parent 3f2d10e2a5
commit c6fd44d819

View file

@ -121,7 +121,7 @@ CMetaInfoReader::~CMetaInfoReader()
*/
bool CMetaInfoReader::hasTag(const std::wstring& TagName) const
{
return ( m_AllMetaInfo.find(TagName) != m_AllMetaInfo.end());
return ( m_AllMetaInfo.contains(TagName) );
}
/** Get a specific tag content, compound tags will be returned as comma separated list.
@ -146,7 +146,7 @@ std::wstring CMetaInfoReader::getTagData( const std::wstring& TagName)
*/
bool CMetaInfoReader::hasTagAttribute(const std::wstring& TagName, const std::wstring& AttributeName)
{
return ( m_AllMetaInfo[TagName].second.find( AttributeName) != m_AllMetaInfo[TagName].second.end() );
return ( m_AllMetaInfo[TagName].second.contains( AttributeName) );
}
/** Get a specific attribute content.