From 9f419314b646bf57dfc3fcbb509b3be2c974e3fd Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 17 Oct 2025 14:33:16 +0800 Subject: Remove String on Linux. --- include/cru/ui/style/StyleRule.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'include/cru/ui/style/StyleRule.h') diff --git a/include/cru/ui/style/StyleRule.h b/include/cru/ui/style/StyleRule.h index 1ae2f0f1..e7f4d390 100644 --- a/include/cru/ui/style/StyleRule.h +++ b/include/cru/ui/style/StyleRule.h @@ -4,9 +4,6 @@ #include "Styler.h" #include "cru/base/ClonablePtr.h" -#include -#include - namespace cru::ui::style { /** * \brief An immutable style rule contains a condition and a styler. @@ -16,13 +13,13 @@ class CRU_UI_API StyleRule : public Object { public: static ClonablePtr Create(ClonablePtr condition, ClonablePtr styler, - String name = {}) { + std::string name = {}) { return ClonablePtr(new StyleRule( std::move(condition), std::move(styler), std::move(name))); } StyleRule(ClonablePtr condition, ClonablePtr styler, - String name = {}); + std::string name = {}); CRU_DEFAULT_COPY(StyleRule) CRU_DEFAULT_MOVE(StyleRule) @@ -30,16 +27,17 @@ class CRU_UI_API StyleRule : public Object { ~StyleRule() override = default; public: - String GetName() const { return name_; } + std::string GetName() const { return name_; } Condition* GetCondition() const { return condition_.get(); } Styler* GetStyler() const { return styler_.get(); } StyleRule WithNewCondition(ClonablePtr condition, - String name = {}) const { + std::string name = {}) const { return StyleRule{std::move(condition), styler_, std::move(name)}; } - StyleRule WithNewStyler(ClonablePtr styler, String name = {}) const { + StyleRule WithNewStyler(ClonablePtr styler, + std::string name = {}) const { return StyleRule{condition_, std::move(styler), std::move(name)}; } @@ -48,6 +46,6 @@ class CRU_UI_API StyleRule : public Object { private: ClonablePtr condition_; ClonablePtr styler_; - String name_; + std::string name_; }; } // namespace cru::ui::style -- cgit v1.2.3