diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2012-12-04 09:47:39 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:47:23 +0300 |
commit | 7b488353b0006e058f290945c841826b3138a834 (patch) | |
tree | 51ca7112aaee2e2a87d1c9afa9c9c6d97751f012 /map | |
parent | bd8abc8b5a7cd058f17017ed8f9a57bdb51507fc (diff) |
[bookmarks] Additional checks to parse only Placemark-related tags, minor optimization
Diffstat (limited to 'map')
-rw-r--r-- | map/bookmark.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/map/bookmark.cpp b/map/bookmark.cpp index 95c1cd3499..e7a0ba957f 100644 --- a/map/bookmark.cpp +++ b/map/bookmark.cpp @@ -281,25 +281,25 @@ namespace bookmark_impl { if (currTag == "name") m_name = value; - else if (currTag == "description") - { - LOG(LINFO, (value)); - m_description = value; - } else if (currTag == "styleUrl") m_type = GetSupportedBMType(value); + else if (currTag == "description") + m_description = value; } - else if (prevTag == "Point") - { - if (currTag == "coordinates") - SetOrigin(value); - } - else if (prevTag == "ExtendedData") + else if (count > 3 && m_tags[2] == "Placemark") { - if (currTag == "mwm:scale") + if (prevTag == "Point") + { + if (currTag == "coordinates") + SetOrigin(value); + } + else if (prevTag == "ExtendedData") { - if (!strings::to_double(value, m_scale)) - m_scale = -1.0; + if (currTag == "mwm:scale") + { + if (!strings::to_double(value, m_scale)) + m_scale = -1.0; + } } } } |