mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-13 13:40:14 +02:00
DirectXTex: Fixed /analyze issues
This commit is contained in:
parent
1b92159d63
commit
4c1a8527c1
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#ifdef __cplusplus_winrt
|
#ifdef __cplusplus_winrt
|
||||||
|
|
||||||
static inline HRESULT CreateMemoryStream( _COM_Outptr_ IStream** stream )
|
static inline HRESULT CreateMemoryStream( _Outptr_ IStream** stream )
|
||||||
{
|
{
|
||||||
auto randomAccessStream = ref new ::Windows::Storage::Streams::InMemoryRandomAccessStream();
|
auto randomAccessStream = ref new ::Windows::Storage::Streams::InMemoryRandomAccessStream();
|
||||||
return CreateStreamOverRandomAccessStream( randomAccessStream, __uuidof(IStream), reinterpret_cast<void **>( &stream ) );
|
return CreateStreamOverRandomAccessStream( randomAccessStream, __uuidof(IStream), reinterpret_cast<void **>( &stream ) );
|
||||||
@ -38,9 +38,8 @@
|
|||||||
#include <wrl\wrappers\corewrappers.h>
|
#include <wrl\wrappers\corewrappers.h>
|
||||||
#include <windows.storage.streams.h>
|
#include <windows.storage.streams.h>
|
||||||
|
|
||||||
static inline HRESULT CreateMemoryStream( _COM_Outptr_ IStream** stream )
|
static inline HRESULT CreateMemoryStream( _Outptr_ IStream** stream )
|
||||||
{
|
{
|
||||||
*stream = nullptr;
|
|
||||||
Microsoft::WRL::ComPtr<ABI::Windows::Storage::Streams::IRandomAccessStream> abiStream;
|
Microsoft::WRL::ComPtr<ABI::Windows::Storage::Streams::IRandomAccessStream> abiStream;
|
||||||
HRESULT hr = Windows::Foundation::ActivateInstance(
|
HRESULT hr = Windows::Foundation::ActivateInstance(
|
||||||
Microsoft::WRL::Wrappers::HStringReference( RuntimeClass_Windows_Storage_Streams_InMemoryRandomAccessStream ).Get(),
|
Microsoft::WRL::Wrappers::HStringReference( RuntimeClass_Windows_Storage_Streams_InMemoryRandomAccessStream ).Get(),
|
||||||
@ -57,7 +56,7 @@
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline HRESULT CreateMemoryStream( _COM_Outptr_ IStream** stream )
|
static inline HRESULT CreateMemoryStream( _Outptr_ IStream** stream )
|
||||||
{
|
{
|
||||||
return CreateStreamOnHGlobal( 0, TRUE, stream );
|
return CreateStreamOnHGlobal( 0, TRUE, stream );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user