MCPcopy Create free account
hub / github.com/comaps/comaps / GetCategoryByFileName

Method GetCategoryByFileName

libs/map/bookmark_manager.cpp:1661–1671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1659}
1660
1661kml::MarkGroupId BookmarkManager::GetCategoryByFileName(std::string const & fileName) const
1662{
1663 CHECK_THREAD_CHECKER(m_threadChecker, ());
1664 std::string const target = base::FileNameFromFullPath(fileName);
1665 for (auto const & c : m_categories)
1666 {
1667 if (base::FileNameFromFullPath(c.second->GetFileName()) == target)
1668 return c.second->GetID();
1669 }
1670 return kml::kInvalidMarkGroupId;
1671}
1672
1673m2::RectD BookmarkManager::GetCategoryRect(kml::MarkGroupId categoryId, bool addIconsSize) const
1674{

Callers

nothing calls this directly

Calls 3

FileNameFromFullPathFunction · 0.85
GetFileNameMethod · 0.45
GetIDMethod · 0.45

Tested by

no test coverage detected