From 32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 17 Oct 2025 12:06:14 +0800 Subject: Remove String stage 1. --- include/cru/platform/graphics/SvgGeometryBuilderMixin.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'include/cru/platform/graphics/SvgGeometryBuilderMixin.h') diff --git a/include/cru/platform/graphics/SvgGeometryBuilderMixin.h b/include/cru/platform/graphics/SvgGeometryBuilderMixin.h index 32b665a5..586872b0 100644 --- a/include/cru/platform/graphics/SvgGeometryBuilderMixin.h +++ b/include/cru/platform/graphics/SvgGeometryBuilderMixin.h @@ -45,25 +45,24 @@ class CRU_PLATFORM_GRAPHICS_API SvgGeometryBuilderMixin void CloseFigure(bool close) override; - void ParseAndApplySvgPathData(StringView path_d) override; + void ParseAndApplySvgPathData(std::string_view path_d) override; protected: - String GetPathData() const { return current_; } + std::string GetPathData() const { return current_; } private: template - void Append(StringView format, Args&&... args) { - current_ += String::FromUtf8( - std::format(format.ToUtf8(), std::forward(args)...)); - current_ += u' '; + void Append(std::string_view format, Args&&... args) { + current_ += std::format(format, std::forward(args)...); + current_ += ' '; } - void AppendCommand(StringView command); + void AppendCommand(std::string_view command); void Append(bool flag); void Append(float number); void Append(const Point& point); private: - String current_; + std::string current_; }; } // namespace cru::platform::graphics -- cgit v1.2.3