forked from organicmaps/organicmaps
Add method for check OSM Id in FeatureBuilder1
This commit is contained in:
parent
5fae32b028
commit
fe874257ac
2 changed files with 9 additions and 0 deletions
|
@ -438,6 +438,14 @@ osm::Id FeatureBuilder1::GetLastOsmId() const
|
|||
return m_osmIds.back();
|
||||
}
|
||||
|
||||
bool FeatureBuilder1::HasOsmId(osm::Id const & id) const
|
||||
{
|
||||
for (auto const & cid : m_osmIds)
|
||||
if (cid == id)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
string FeatureBuilder1::GetOsmIdsString() const
|
||||
{
|
||||
if (m_osmIds.empty())
|
||||
|
|
|
@ -156,6 +156,7 @@ public:
|
|||
void AddOsmId(osm::Id id);
|
||||
void SetOsmId(osm::Id id);
|
||||
osm::Id GetLastOsmId() const;
|
||||
bool HasOsmId(osm::Id const & id) const;
|
||||
string GetOsmIdsString() const;
|
||||
//@}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue