From 69b65baa03191b556a2e59f85a10c0c234c13e19 Mon Sep 17 00:00:00 2001 From: karurung <84292079+karurung@users.noreply.github.com> Date: Sat, 5 Oct 2024 18:13:25 -0700 Subject: [PATCH] Update DirectXTexXboxDDS.cpp // Using const uint8_t* instead of const void* enhances type safety and improves code security. --- Auxiliary/DirectXTexXboxDDS.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Auxiliary/DirectXTexXboxDDS.cpp b/Auxiliary/DirectXTexXboxDDS.cpp index 8158f08..666bfbd 100644 --- a/Auxiliary/DirectXTexXboxDDS.cpp +++ b/Auxiliary/DirectXTexXboxDDS.cpp @@ -27,7 +27,7 @@ namespace // Decodes DDS header using XBOX extended header (variant of DX10 header) //------------------------------------------------------------------------------------- HRESULT DecodeDDSHeader( - _In_reads_bytes_(size) const void* pSource, + _In_reads_bytes_(size) const uint8_t* pSource, size_t size, DirectX::TexMetadata& metadata, _Out_opt_ DDSMetaData* ddPixelFormat, @@ -229,7 +229,7 @@ namespace _Use_decl_annotations_ HRESULT Xbox::EncodeDDSHeader( const XboxImage& xbox, - void* pDestination, + uint8_t* pDestination, size_t maxsize) noexcept { if (!pDestination) @@ -383,7 +383,7 @@ HRESULT Xbox::EncodeDDSHeader( _Use_decl_annotations_ HRESULT Xbox::GetMetadataFromDDSMemory( - const void* pSource, + const uint8_t* pSource, size_t size, TexMetadata& metadata, bool& isXbox) @@ -393,7 +393,7 @@ HRESULT Xbox::GetMetadataFromDDSMemory( _Use_decl_annotations_ HRESULT Xbox::GetMetadataFromDDSMemoryEx( - const void* pSource, + const uint8_t* pSource, size_t size, TexMetadata& metadata, bool& isXbox, @@ -498,7 +498,7 @@ HRESULT Xbox::GetMetadataFromDDSFileEx( //------------------------------------------------------------------------------------- _Use_decl_annotations_ HRESULT Xbox::LoadFromDDSMemory( - const void* pSource, + const uint8_t* pSource, size_t size, TexMetadata* metadata, XboxImage& xbox) @@ -508,7 +508,7 @@ HRESULT Xbox::LoadFromDDSMemory( _Use_decl_annotations_ HRESULT Xbox::LoadFromDDSMemoryEx( - const void* pSource, + const uint8_t* pSource, size_t size, TexMetadata* metadata, DDSMetaData* ddPixelFormat,