mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-04 04:16:12 +01:00
Add GitHub Action for super-lint (#618)
This commit is contained in:
@@ -64,22 +64,21 @@ using Microsoft::WRL::ComPtr;
|
||||
namespace
|
||||
{
|
||||
//--------------------------------------------------------------------------------------
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_ const char(&name)[TNameLength]) noexcept
|
||||
{
|
||||
resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name);
|
||||
}
|
||||
#else
|
||||
#else
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D11DeviceChild*, _In_ const char(&)[TNameLength]) noexcept
|
||||
{
|
||||
}
|
||||
#endif
|
||||
{}
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
// WIC Pixel Format Translation Data
|
||||
//-------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------
|
||||
// WIC Pixel Format Translation Data
|
||||
//-------------------------------------------------------------------------------------
|
||||
struct WICTranslate
|
||||
{
|
||||
const GUID& wic;
|
||||
@@ -87,7 +86,8 @@ namespace
|
||||
|
||||
constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt) noexcept :
|
||||
wic(wg),
|
||||
format(fmt) {}
|
||||
format(fmt)
|
||||
{}
|
||||
};
|
||||
|
||||
constexpr WICTranslate g_WICFormats[] =
|
||||
@@ -125,7 +125,8 @@ namespace
|
||||
|
||||
constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept :
|
||||
source(src),
|
||||
target(tgt) {}
|
||||
target(tgt)
|
||||
{}
|
||||
};
|
||||
|
||||
constexpr WICConvert g_WICConvert[] =
|
||||
|
||||
@@ -49,9 +49,10 @@ namespace DirectX
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
|
||||
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
|
||||
#endif
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS)
|
||||
DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@@ -78,7 +78,8 @@ namespace
|
||||
|
||||
constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt) noexcept :
|
||||
wic(wg),
|
||||
format(fmt) {}
|
||||
format(fmt)
|
||||
{}
|
||||
};
|
||||
|
||||
constexpr WICTranslate g_WICFormats[] =
|
||||
@@ -118,7 +119,8 @@ namespace
|
||||
|
||||
constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept :
|
||||
source(src),
|
||||
target(tgt) {}
|
||||
target(tgt)
|
||||
{}
|
||||
};
|
||||
|
||||
constexpr WICConvert g_WICConvert[] =
|
||||
@@ -209,18 +211,17 @@ namespace
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
#if !defined(NO_D3D12_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
#if !defined(NO_D3D12_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D12DeviceChild* resource, _In_z_ const wchar_t(&name)[TNameLength]) noexcept
|
||||
{
|
||||
resource->SetName(name);
|
||||
}
|
||||
#else
|
||||
#else
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D12DeviceChild*, _In_z_ const wchar_t(&)[TNameLength]) noexcept
|
||||
{
|
||||
}
|
||||
#endif
|
||||
{}
|
||||
#endif
|
||||
|
||||
inline uint32_t CountMips(uint32_t width, uint32_t height) noexcept
|
||||
{
|
||||
|
||||
@@ -63,9 +63,10 @@ namespace DirectX
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
|
||||
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
|
||||
#endif
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS)
|
||||
DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@@ -66,7 +66,8 @@ namespace
|
||||
|
||||
constexpr WICTranslate(const GUID& wg, D3DFORMAT fmt) noexcept :
|
||||
wic(wg),
|
||||
format(fmt) {}
|
||||
format(fmt)
|
||||
{}
|
||||
};
|
||||
|
||||
constexpr WICTranslate g_WICFormats[] =
|
||||
@@ -102,7 +103,8 @@ namespace
|
||||
|
||||
constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept :
|
||||
source(src),
|
||||
target(tgt) {}
|
||||
target(tgt)
|
||||
{}
|
||||
};
|
||||
|
||||
constexpr WICConvert g_WICConvert[] =
|
||||
|
||||
@@ -45,9 +45,10 @@ namespace DirectX
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
|
||||
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
|
||||
#endif
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS)
|
||||
DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
Reference in New Issue
Block a user