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/components/Menu.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'include/cru/ui/components/Menu.h') diff --git a/include/cru/ui/components/Menu.h b/include/cru/ui/components/Menu.h index f4e54c9f..82766aa5 100644 --- a/include/cru/ui/components/Menu.h +++ b/include/cru/ui/components/Menu.h @@ -48,13 +48,11 @@ class CRU_UI_API Menu : public Component { public: controls::Control* GetRootControl() override { return &container_; } - gsl::index GetItemCount() const { - return static_cast(items_.size()); - } + Index GetItemCount() const { return static_cast(items_.size()); } void AddItem(Component* component) { AddItemAt(component, GetItemCount()); } - void AddItemAt(Component* component, gsl::index index); - Component* RemoveItemAt(gsl::index index); + void AddItemAt(Component* component, Index index); + Component* RemoveItemAt(Index index); void ClearItems(); void AddTextItem(String text, std::function on_click) { -- cgit v1.2.3