Add GitHub Action for super-lint (#618)

This commit is contained in:
Chuck Walbourn
2025-06-02 17:49:20 -07:00
committed by GitHub
parent c8959b2911
commit cb3be57e9c
78 changed files with 5040 additions and 4816 deletions

View File

@@ -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[] =

View File

@@ -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

View File

@@ -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
{

View File

@@ -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

View File

@@ -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[] =

View File

@@ -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