From 3c8d5c8f732239a8b50418be27464e30b9dddeae Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 17 Oct 2025 08:37:30 +0800 Subject: Exception remove string. --- src/platform/graphics/direct2d/ImageFactory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/platform/graphics/direct2d/ImageFactory.cpp') diff --git a/src/platform/graphics/direct2d/ImageFactory.cpp b/src/platform/graphics/direct2d/ImageFactory.cpp index 113f70c8..b9e9221a 100644 --- a/src/platform/graphics/direct2d/ImageFactory.cpp +++ b/src/platform/graphics/direct2d/ImageFactory.cpp @@ -67,14 +67,14 @@ GUID ConvertImageFormatToGUID(ImageFormat format) { format_guid = GUID_ContainerFormatGif; break; default: - throw Exception(u"Unknown image format"); + throw Exception("Unknown image format"); } return format_guid; } void WinImageFactory::EncodeToStream(IImage* image, io::Stream* stream, ImageFormat format, float quality) { - auto direct_image = CheckPlatform(image, GetPlatformId()); + auto direct_image = CheckPlatform(image, GetPlatformIdUtf8()); Microsoft::WRL::ComPtr com_stream( platform::win::ConvertStreamToComStream(stream)); @@ -139,8 +139,8 @@ void WinImageFactory::EncodeToStream(IImage* image, io::Stream* stream, } std::unique_ptr WinImageFactory::CreateBitmap(int width, int height) { - if (width <= 0) throw Exception(u"Bitmap width must be greater than 0."); - if (height <= 0) throw Exception(u"Bitmap height must be greater than 0."); + if (width <= 0) throw Exception("Bitmap width must be greater than 0."); + if (height <= 0) throw Exception("Bitmap height must be greater than 0."); auto graphics_factory = GetDirectFactory(); -- cgit v1.2.3