[core] Force getGeometries() return const ref

This commit is contained in:
Alexander Shalamov
2019-07-23 08:54:16 +03:00
committed by Mikhail Pozdnyakov
parent 6798d21eda
commit 852fef66ef
14 changed files with 33 additions and 25 deletions

View File

@@ -17,7 +17,7 @@ public:
}
PropertyMap getProperties() const override { return feature.properties; }
FeatureIdentifier getID() const override { return feature.id; }
GeometryCollection getGeometries() const override { return {}; }
const GeometryCollection& getGeometries() const override { return geometry; }
optional<mbgl::Value> getValue(const std::string& key) const override {
auto it = feature.properties.find(key);
if (it != feature.properties.end()) {
@@ -25,6 +25,8 @@ public:
}
return optional<mbgl::Value>();
}
GeometryCollection geometry;
};