[core] Add style::Layer(Impl) constructor
This commit is contained in:
@@ -51,6 +51,7 @@ public:
|
||||
|
||||
class Impl;
|
||||
Immutable<Impl> impl;
|
||||
explicit Light(Immutable<Impl>);
|
||||
Mutable<Impl> mutableImpl() const;
|
||||
|
||||
LightObserver* observer = nullptr;
|
||||
|
||||
@@ -38,6 +38,7 @@ public:
|
||||
<% } -%>
|
||||
class Impl;
|
||||
Immutable<Impl> impl;
|
||||
explicit Light(Immutable<Impl>);
|
||||
Mutable<Impl> mutableImpl() const;
|
||||
|
||||
LightObserver* observer = nullptr;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user