[core] More efficient layer cloning

This commit is contained in:
John Firebaugh
2015-12-04 15:19:12 -08:00
parent fc0c839fc8
commit 0a0007e0ac
11 changed files with 41 additions and 53 deletions

View File

@@ -4,10 +4,7 @@
namespace mbgl {
std::unique_ptr<StyleLayer> RasterLayer::clone() const {
std::unique_ptr<RasterLayer> result = std::make_unique<RasterLayer>();
result->copy(*this);
result->paint = paint;
return std::move(result);
return std::make_unique<RasterLayer>(*this);
}
void RasterLayer::parsePaints(const JSVal& layer) {