From ba43736c55ad510942e9e83ca0c8bea7265cf055 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 24 Mar 2021 22:58:07 +0800 Subject: ... --- include/cru/common/Format.hpp | 7 +------ include/cru/ui/style/StyleRuleSet.hpp | 8 -------- 2 files changed, 1 insertion(+), 14 deletions(-) (limited to 'include/cru') diff --git a/include/cru/common/Format.hpp b/include/cru/common/Format.hpp index 59f34036..d4da2208 100644 --- a/include/cru/common/Format.hpp +++ b/include/cru/common/Format.hpp @@ -13,11 +13,6 @@ namespace cru { template >> std::u16string ToUtf16String(T number) { - std::array buffer; - auto result = - std::to_chars(buffer.data(), buffer.data() + buffer.size(), number); - Ensures(result.ec == std::errc()); - std::string_view utf8_result(buffer.data(), result.ptr - buffer.data()); - return ToUtf16(utf8_result); + return ToUtf16(std::to_string(number)); } } // namespace cru diff --git a/include/cru/ui/style/StyleRuleSet.hpp b/include/cru/ui/style/StyleRuleSet.hpp index e62dd2de..b3c4f683 100644 --- a/include/cru/ui/style/StyleRuleSet.hpp +++ b/include/cru/ui/style/StyleRuleSet.hpp @@ -29,14 +29,6 @@ class StyleRuleSet : public Object { void AddStyleRule(StyleRule rule, gsl::index index); - template - void AddStyleRuleRange(Iter start, Iter end, gsl::index index) { - Expects(index >= 0 && index <= GetSize()); - rules_.insert(rules_.cbegin() + index, std::move(start), std::move(end)); - UpdateChangeListener(); - UpdateStyle(); - } - void RemoveStyleRule(gsl::index index, gsl::index count = 1); void Clear() { RemoveStyleRule(0, GetSize()); } -- cgit v1.2.3