diff --git a/libobs-d3d11/d3d11-subsystem.hpp b/libobs-d3d11/d3d11-subsystem.hpp index e5139d4ea..0be9a9e2d 100644 --- a/libobs-d3d11/d3d11-subsystem.hpp +++ b/libobs-d3d11/d3d11-subsystem.hpp @@ -143,7 +143,7 @@ ConvertGSTextureFormatViewLinear(gs_color_format format) static inline gs_color_format ConvertDXGITextureFormat(DXGI_FORMAT format) { - switch ((unsigned long)format) { + switch (format) { case DXGI_FORMAT_A8_UNORM: return GS_A8; case DXGI_FORMAT_R8_UNORM: diff --git a/libobs-opengl/gl-windows.c b/libobs-opengl/gl-windows.c index e9f3f0938..b93396c63 100644 --- a/libobs-opengl/gl-windows.c +++ b/libobs-opengl/gl-windows.c @@ -39,7 +39,7 @@ struct gl_platform { /* For now, only support basic 32bit formats for graphics output. */ static inline int get_color_format_bits(enum gs_color_format format) { - switch ((uint32_t)format) { + switch (format) { case GS_RGBA: case GS_BGRA: return 32; @@ -50,7 +50,7 @@ static inline int get_color_format_bits(enum gs_color_format format) static inline int get_depth_format_bits(enum gs_zstencil_format zsformat) { - switch ((uint32_t)zsformat) { + switch (zsformat) { case GS_Z16: return 16; case GS_Z24_S8: @@ -62,7 +62,7 @@ static inline int get_depth_format_bits(enum gs_zstencil_format zsformat) static inline int get_stencil_format_bits(enum gs_zstencil_format zsformat) { - switch ((uint32_t)zsformat) { + switch (zsformat) { case GS_Z24_S8: return 8; default: diff --git a/plugins/obs-qsv11/common_directx9.cpp b/plugins/obs-qsv11/common_directx9.cpp index 4e49961a7..00f22f7e7 100644 --- a/plugins/obs-qsv11/common_directx9.cpp +++ b/plugins/obs-qsv11/common_directx9.cpp @@ -186,7 +186,7 @@ mfxStatus dx9_simple_lock(mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr) if (FAILED(hr)) return MFX_ERR_LOCK_MEMORY; - switch ((DWORD)desc.Format) { + switch (desc.Format) { case D3DFMT_NV12: ptr->Pitch = (mfxU16)locked.Pitch; ptr->Y = (mfxU8 *)locked.pBits; diff --git a/plugins/win-capture/graphics-hook/d3d8-capture.cpp b/plugins/win-capture/graphics-hook/d3d8-capture.cpp index e5a2b11b7..eb81794e8 100644 --- a/plugins/win-capture/graphics-hook/d3d8-capture.cpp +++ b/plugins/win-capture/graphics-hook/d3d8-capture.cpp @@ -35,7 +35,7 @@ static d3d8_data data = {}; static DXGI_FORMAT d3d8_to_dxgi_format(D3DFORMAT format) { - switch ((unsigned long)format) { + switch (format) { case D3DFMT_X1R5G5B5: case D3DFMT_A1R5G5B5: return DXGI_FORMAT_B5G5R5A1_UNORM; diff --git a/plugins/win-capture/graphics-hook/d3d9-capture.cpp b/plugins/win-capture/graphics-hook/d3d9-capture.cpp index 7ee411522..cf537435b 100644 --- a/plugins/win-capture/graphics-hook/d3d9-capture.cpp +++ b/plugins/win-capture/graphics-hook/d3d9-capture.cpp @@ -94,7 +94,7 @@ static void d3d9_free() static DXGI_FORMAT d3d9_to_dxgi_format(D3DFORMAT format) { - switch ((unsigned long)format) { + switch (format) { case D3DFMT_A2B10G10R10: return DXGI_FORMAT_R10G10B10A2_UNORM; case D3DFMT_A8R8G8B8: diff --git a/plugins/win-capture/graphics-hook/dxgi-helpers.hpp b/plugins/win-capture/graphics-hook/dxgi-helpers.hpp index f23bdccf2..c9b10ff04 100644 --- a/plugins/win-capture/graphics-hook/dxgi-helpers.hpp +++ b/plugins/win-capture/graphics-hook/dxgi-helpers.hpp @@ -4,7 +4,7 @@ static inline DXGI_FORMAT strip_dxgi_format_srgb(DXGI_FORMAT format) { - switch ((unsigned long)format) { + switch (format) { case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: return DXGI_FORMAT_B8G8R8A8_UNORM; case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: @@ -18,7 +18,7 @@ static inline DXGI_FORMAT apply_dxgi_format_typeless(DXGI_FORMAT format, bool allow_srgb_alias) { if (allow_srgb_alias) { - switch ((unsigned long)format) { + switch (format) { case DXGI_FORMAT_B8G8R8A8_UNORM: return DXGI_FORMAT_B8G8R8A8_TYPELESS; case DXGI_FORMAT_R8G8B8A8_UNORM: