[core] Replace createRender{Source,Layer} with Render{Source,Layer}::create

* Eliminates the need for EnableImmutableFromThis
* Eliminates the dependency of {Source,Layer}::Impl on corresponding Render class (circular dependency)
This commit is contained in:
John Firebaugh
2017-05-11 10:29:37 -07:00
parent afead4e749
commit 095dc7b167
43 changed files with 91 additions and 117 deletions

View File

@@ -1,5 +1,4 @@
#include <mbgl/style/sources/vector_source_impl.hpp>
#include <mbgl/renderer/sources/render_vector_source.hpp>
namespace mbgl {
namespace style {
@@ -24,9 +23,5 @@ optional<std::string> VectorSource::Impl::getAttribution() const {
return tileset->attribution;
}
std::unique_ptr<RenderSource> VectorSource::Impl::createRenderSource() const {
return std::make_unique<RenderVectorSource>(staticImmutableCast<VectorSource::Impl>(immutableFromThis()));
}
} // namespace style
} // namespace mbgl