[core] Add style::Layer(Impl) constructor

This commit is contained in:
Mikhail Pozdnyakov
2019-12-12 14:49:11 +02:00
parent 426f714c04
commit 9901167936
4 changed files with 8 additions and 8 deletions

View File

@@ -51,6 +51,7 @@ public:
class Impl;
Immutable<Impl> impl;
explicit Light(Immutable<Impl>);
Mutable<Impl> mutableImpl() const;
LightObserver* observer = nullptr;

View File

@@ -38,6 +38,7 @@ public:
<% } -%>
class Impl;
Immutable<Impl> impl;
explicit Light(Immutable<Impl>);
Mutable<Impl> mutableImpl() const;
LightObserver* observer = nullptr;

View File

@@ -17,10 +17,9 @@ namespace style {
static LightObserver nullObserver;
Light::Light()
: impl(makeMutable<Impl>()),
observer(&nullObserver) {
}
Light::Light(Immutable<Light::Impl> impl_) : impl(std::move(impl_)), observer(&nullObserver) {}
Light::Light() : Light(makeMutable<Impl>()) {}
Light::~Light() = default;

View File

@@ -20,10 +20,9 @@ namespace style {
static LightObserver nullObserver;
Light::Light()
: impl(makeMutable<Impl>()),
observer(&nullObserver) {
}
Light::Light(Immutable<Light::Impl> impl_) : impl(std::move(impl_)), observer(&nullObserver) {}
Light::Light() : Light(makeMutable<Impl>()) {}
Light::~Light() = default;