[Differential] [Request, 110 lines] D2684: Add and use OsmPlacemarkData::findTag(const QString& key)
kossebau (Friedrich W. H. Kossebau)
noreply at phabricator.kde.org
Tue Sep 6 15:47:42 UTC 2016
kossebau created this revision.
kossebau added reviewers: Marble, shentey, nienhueser, sanjibanb.
REVISION SUMMARY
Some code getting data from OsmPlacemarkData instances currently
does a double-lookup with data.containsTagKey(x) & data.tagValue(x).
As OsmPlacemarkData already exposes begin and end iterators for the
tags, adding a findTag(const QString &key) to allow single-lookup
of a tag on conditional access to its value seems matching.
Resulting code trades readability (IMHO) for speed, but for a library this
option seems to make sense.
REPOSITORY
rMARBLE Marble
BRANCH
OsmPlacemarkData.findTag
REVISION DETAIL
https://phabricator.kde.org/D2684
AFFECTED FILES
src/lib/marble/StyleBuilder.cpp
src/lib/marble/geodata/graphicsitem/GeoPolygonGraphicsItem.cpp
src/lib/marble/osm/OsmPlacemarkData.cpp
src/lib/marble/osm/OsmPlacemarkData.h
src/plugins/runner/json/JsonParser.cpp
src/plugins/runner/osm/OsmNode.cpp
src/plugins/runner/osm/OsmRelation.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: kossebau, #marble, shentey, nienhueser, sanjibanb
Cc: marble-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20160906/76eded46/attachment.html>
More information about the Marble-devel
mailing list