diff options
Diffstat (limited to 'src/libserver/css/css_style.hxx')
-rw-r--r-- | src/libserver/css/css_style.hxx | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/libserver/css/css_style.hxx b/src/libserver/css/css_style.hxx index 2a97f8f0e..429e58fdd 100644 --- a/src/libserver/css/css_style.hxx +++ b/src/libserver/css/css_style.hxx @@ -32,29 +32,35 @@ namespace rspamd::css { class css_style { public: /* Make class trivial */ - css_style (const css_style &other) = default; + css_style(const css_style &other) = default; - css_style (const std::shared_ptr<css_style> &_parent) : parent(_parent) { - propagate_from_parent (); + css_style(const std::shared_ptr<css_style> &_parent) + : parent(_parent) + { + propagate_from_parent(); } - css_style (const std::shared_ptr<css_style> &_parent, - const std::vector<std::shared_ptr<css_selector> > &_selectors) : parent(_parent) { - selectors.reserve (_selectors.size ()); + css_style(const std::shared_ptr<css_style> &_parent, + const std::vector<std::shared_ptr<css_selector>> &_selectors) + : parent(_parent) + { + selectors.reserve(_selectors.size()); - for (const auto &sel_ptr : _selectors) { - selectors.emplace_back (sel_ptr); + for (const auto &sel_ptr: _selectors) { + selectors.emplace_back(sel_ptr); } - propagate_from_parent (); + propagate_from_parent(); } + private: - std::vector<std::weak_ptr<css_selector> > selectors; + std::vector<std::weak_ptr<css_selector>> selectors; std::weak_ptr<css_style> parent; std::vector<css_rule> rules; + private: void propagate_from_parent(void); /* Construct full style using parent */ }; -} +}// namespace rspamd::css -#endif //RSPAMD_CSS_STYLE_HXX +#endif//RSPAMD_CSS_STYLE_HXX |