11#pragma once
22#include < cstdint>
3+ #include < LLUtils/Warnings.h>
34namespace FreeType
45{
56 struct BlitBox
@@ -20,13 +21,16 @@ namespace FreeType
2021 template <typename color_type>
2122 static void BlitPremultiplied (BlitBox& dst, const BlitBox& src)
2223 {
24+ LLUTILS_DISABLE_WARNING_PUSH
25+ LLUTILS_DISABLE_WARNING_UNSAFE_BUFFER_USAGE
26+
2327 const std::byte* srcPos = src.buffer + src.GetStartOffset ();
2428 std::byte* dstPos = dst.buffer + dst.GetStartOffset ();
2529
2630 // Perform range check on target.
2731 if (dst.left + src.width > dst.width || dst.top + src.height > dst.height )
2832 LL_EXCEPTION (LLUtils::Exception::ErrorCode::LogicError, " Buffer out of bounds" );
29-
33+ LLUTILS_DISABLE_WARNING_POP
3034 const uint32_t bytesPerLine = src.pixelSizeInbytes * src.width ;
3135
3236 for (uint32_t y = src.top ; y < src.height ; y++)
@@ -47,13 +51,15 @@ namespace FreeType
4751
4852 static void Blit (BlitBox& dst, const BlitBox& src)
4953 {
54+ LLUTILS_DISABLE_WARNING_PUSH
55+ LLUTILS_DISABLE_WARNING_UNSAFE_BUFFER_USAGE
5056 const std::byte* srcPos = src.buffer + src.GetStartOffset ();
5157 std::byte* dstPos = dst.buffer + dst.GetStartOffset ();
5258
5359 // Perform range check on target.
5460 if (dst.left + src.width > dst.width || dst.top + src.height > dst.height )
5561 LL_EXCEPTION (LLUtils::Exception::ErrorCode::LogicError, " Buffer out of bounds" );
56-
62+ LLUTILS_DISABLE_WARNING_POP
5763
5864 const uint32_t bytesPerLine = src.pixelSizeInbytes * src.width ;
5965
0 commit comments