From f3af6c7e5b46f4209a4981e5d7be217368f40b15 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 8 Feb 2024 15:12:29 +0800 Subject: Get rid of GSL. --- include/cru/ui/style/StyleRuleSet.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/cru/ui/style') 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 GetParent() const { return parent_; } void SetParent(std::shared_ptr parent); - gsl::index GetSize() const { return static_cast(rules_.size()); } + Index GetSize() const { return static_cast(rules_.size()); } const std::vector& 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. -- cgit v1.2.3