diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-11 10:29:37 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-12 11:26:27 -0700 |
commit | 095dc7b16793ed502b3429e0e4c2db7f1207094e (patch) | |
tree | 929856d13dcec05a610b497cc2256b44725ba184 /include/mbgl/util | |
parent | afead4e749794e6d0f6b9cb9bd7897face64104a (diff) | |
download | qtlocation-mapboxgl-095dc7b16793ed502b3429e0e4c2db7f1207094e.tar.gz |
[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)
Diffstat (limited to 'include/mbgl/util')
-rw-r--r-- | include/mbgl/util/immutable.hpp | 9 |
1 files changed, 0 insertions, 9 deletions
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<const T> ptr; template <class S> friend class Immutable; - template <class S> friend class EnableImmutableFromThis; template <class S, class U> friend Immutable<S> staticImmutableCast(const Immutable<U>&); }; -template <class T> -class EnableImmutableFromThis : public std::enable_shared_from_this<const T> { -public: - Immutable<T> immutableFromThis() const { - return Immutable<T>(this->shared_from_this()); - } -}; - template <class S, class U> Immutable<S> staticImmutableCast(const Immutable<U>& u) { return Immutable<S>(std::static_pointer_cast<const S>(u.ptr)); |