[core] Move generic setProperty() parts to the base Layer class
This commit is contained in:
@@ -283,12 +283,9 @@ Value HeatmapLayer::serialize() const {
|
||||
return result;
|
||||
}
|
||||
|
||||
optional<Error> HeatmapLayer::setProperty(const std::string& name, const Convertible& value) {
|
||||
optional<Error> HeatmapLayer::setPropertyInternal(const std::string& name, const Convertible& value) {
|
||||
const auto it = layerProperties.find(name.c_str());
|
||||
if (it == layerProperties.end()) {
|
||||
if (name == "visibility") return setVisibility(value);
|
||||
return Error{"layer doesn't support this property"};
|
||||
}
|
||||
if (it == layerProperties.end()) return Error{"layer doesn't support this property"};
|
||||
|
||||
auto property = static_cast<Property>(it->second);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user