mirror of
https://github.com/AssetRipper/AssetRipper.TextureDecoder.git
synced 2026-11-13 04:26:30 -10:00
16 lines
348 B
C#
16 lines
348 B
C#
namespace AssetRipper.TextureDecoder
|
|
{
|
|
internal static class ThrowHelper
|
|
{
|
|
private const int BytesPerPixel = 4;
|
|
|
|
internal static void ThrowIfNotEnoughSpace(Span<byte> output, int width, int height)
|
|
{
|
|
if (output.Length < width * height * BytesPerPixel)
|
|
{
|
|
throw new InvalidOperationException("Not enough space");
|
|
}
|
|
}
|
|
}
|
|
}
|