diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-10-17 08:37:30 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-10-17 08:37:30 +0800 |
commit | 3c8d5c8f732239a8b50418be27464e30b9dddeae (patch) | |
tree | 8ffb46c18e48c8463c1fb16fcacf216f296b8a1f /src/platform/graphics/direct2d/ImageFactory.cpp | |
parent | 37943858b3b260589b5dc222bb5184d2846fb6dc (diff) | |
download | cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.tar.gz cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.tar.bz2 cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.zip |
Exception remove string.
Diffstat (limited to 'src/platform/graphics/direct2d/ImageFactory.cpp')
-rw-r--r-- | src/platform/graphics/direct2d/ImageFactory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<Direct2DImage>(image, GetPlatformId()); + auto direct_image = CheckPlatform<Direct2DImage>(image, GetPlatformIdUtf8()); Microsoft::WRL::ComPtr<IStream> com_stream( platform::win::ConvertStreamToComStream(stream)); @@ -139,8 +139,8 @@ void WinImageFactory::EncodeToStream(IImage* image, io::Stream* stream, } std::unique_ptr<IImage> 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(); |