From 095dc7b16793ed502b3429e0e4c2db7f1207094e Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 11 May 2017 10:29:37 -0700 Subject: [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) --- include/mbgl/util/immutable.hpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include/mbgl/util') diff --git a/include/mbgl/util/immutable.hpp b/include/mbgl/util/immutable.hpp index 1d6ff4079a..2cdce8772d 100644 --- a/include/mbgl/util/immutable.hpp +++ b/include/mbgl/util/immutable.hpp @@ -107,18 +107,9 @@ private: std::shared_ptr ptr; template friend class Immutable; - template friend class EnableImmutableFromThis; template friend Immutable staticImmutableCast(const Immutable&); }; -template -class EnableImmutableFromThis : public std::enable_shared_from_this { -public: - Immutable immutableFromThis() const { - return Immutable(this->shared_from_this()); - } -}; - template Immutable staticImmutableCast(const Immutable& u) { return Immutable(std::static_pointer_cast(u.ptr)); -- cgit v1.2.1