diff options
author | crupest <crupest@outlook.com> | 2024-02-08 15:12:29 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2024-02-08 15:12:29 +0800 |
commit | f3af6c7e5b46f4209a4981e5d7be217368f40b15 (patch) | |
tree | e932747ad91a718abb667a6170b21f1521a04d1e /include/cru/ui/style | |
parent | bfe23251a54b036abef9241ba0994c9e51db25b2 (diff) | |
download | cru-f3af6c7e5b46f4209a4981e5d7be217368f40b15.tar.gz cru-f3af6c7e5b46f4209a4981e5d7be217368f40b15.tar.bz2 cru-f3af6c7e5b46f4209a4981e5d7be217368f40b15.zip |
Get rid of GSL.
Diffstat (limited to 'include/cru/ui/style')
-rw-r--r-- | include/cru/ui/style/StyleRuleSet.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/cru/ui/style/StyleRuleSet.h b/include/cru/ui/style/StyleRuleSet.h index 8f3495bc..080c2eb8 100644 --- a/include/cru/ui/style/StyleRuleSet.h +++ b/include/cru/ui/style/StyleRuleSet.h @@ -27,16 +27,16 @@ class CRU_UI_API StyleRuleSet : public Object, public model::IListChangeNotify { std::shared_ptr<StyleRuleSet> GetParent() const { return parent_; } void SetParent(std::shared_ptr<StyleRuleSet> parent); - gsl::index GetSize() const { return static_cast<gsl::index>(rules_.size()); } + Index GetSize() const { return static_cast<Index>(rules_.size()); } const std::vector<StyleRule>& GetRules() const { return rules_; } void AddStyleRule(StyleRule rule) { AddStyleRule(std::move(rule), GetSize()); } - void AddStyleRule(StyleRule rule, gsl::index index); + void AddStyleRule(StyleRule rule, Index index); - void RemoveStyleRule(gsl::index index, gsl::index count = 1); + void RemoveStyleRule(Index index, Index count = 1); const StyleRule& GetStyleRule(Index index) const { return rules_[index]; } void SetStyleRule(Index index, StyleRule rule); @@ -45,7 +45,7 @@ class CRU_UI_API StyleRuleSet : public Object, public model::IListChangeNotify { void Set(const StyleRuleSet& other, bool set_parent = false); - const StyleRule& operator[](gsl::index index) const { return rules_[index]; } + const StyleRule& operator[](Index index) const { return rules_[index]; } // Triggered whenever a change happened to this (rule add or remove, parent // change ...). Subscribe to this and update style change listeners and style. |