Merge pull request #14641 from Dentomologist/replace_maybe_unused_annotations_with_commented_names

Replace some [[maybe_unused]] annotations with commented names
This commit is contained in:
Jordan Woyak
2026-05-03 20:20:07 -05:00
committed by GitHub
8 changed files with 25 additions and 22 deletions
@@ -15,7 +15,7 @@ ConsoleListener::~ConsoleListener()
{ {
} }
void ConsoleListener::Log([[maybe_unused]] Common::Log::LogLevel level, const char* text) void ConsoleListener::Log(Common::Log::LogLevel, const char* text)
{ {
::OutputDebugStringW(UTF8ToWString(text).c_str()); ::OutputDebugStringW(UTF8ToWString(text).c_str());
} }
@@ -57,7 +57,7 @@ void Microphone::StreamInit()
{ {
} }
void Microphone::StreamStart([[maybe_unused]] u32 sampling_rate) void Microphone::StreamStart(u32 /* sampling_rate */)
{ {
} }
+8 -7
View File
@@ -34,7 +34,7 @@ bool NullGfx::SupportsUtilityDrawing() const
} }
std::unique_ptr<AbstractTexture> NullGfx::CreateTexture(const TextureConfig& config, std::unique_ptr<AbstractTexture> NullGfx::CreateTexture(const TextureConfig& config,
[[maybe_unused]] std::string_view name) std::string_view /* name */)
{ {
return std::make_unique<NullTexture>(config); return std::make_unique<NullTexture>(config);
} }
@@ -52,16 +52,17 @@ public:
}; };
std::unique_ptr<AbstractShader> std::unique_ptr<AbstractShader>
NullGfx::CreateShaderFromSource(ShaderStage stage, [[maybe_unused]] std::string_view source, NullGfx::CreateShaderFromSource(ShaderStage stage, std::string_view /* source */,
[[maybe_unused]] VideoCommon::ShaderIncluder* shader_includer, VideoCommon::ShaderIncluder* /* shader_includer */,
[[maybe_unused]] std::string_view name) std::string_view /* name */)
{ {
return std::make_unique<NullShader>(stage); return std::make_unique<NullShader>(stage);
} }
std::unique_ptr<AbstractShader> std::unique_ptr<AbstractShader> NullGfx::CreateShaderFromBinary(ShaderStage stage,
NullGfx::CreateShaderFromBinary(ShaderStage stage, const void* data, size_t length, const void* /* data */,
[[maybe_unused]] std::string_view name) size_t /* length */,
std::string_view /* name */)
{ {
return std::make_unique<NullShader>(stage); return std::make_unique<NullShader>(stage);
} }
+4 -3
View File
@@ -235,9 +235,10 @@ OGLGfx::CreateShaderFromSource(ShaderStage stage, std::string_view source,
return OGLShader::CreateFromSource(stage, source, shader_includer, name); return OGLShader::CreateFromSource(stage, source, shader_includer, name);
} }
std::unique_ptr<AbstractShader> std::unique_ptr<AbstractShader> OGLGfx::CreateShaderFromBinary(ShaderStage /* stage */,
OGLGfx::CreateShaderFromBinary(ShaderStage stage, const void* data, size_t length, const void* /* data */,
[[maybe_unused]] std::string_view name) size_t /* length */,
std::string_view /* name */)
{ {
return nullptr; return nullptr;
} }
+8 -7
View File
@@ -35,7 +35,7 @@ bool SWGfx::SupportsUtilityDrawing() const
} }
std::unique_ptr<AbstractTexture> SWGfx::CreateTexture(const TextureConfig& config, std::unique_ptr<AbstractTexture> SWGfx::CreateTexture(const TextureConfig& config,
[[maybe_unused]] std::string_view name) std::string_view /* name */)
{ {
return std::make_unique<SWTexture>(config); return std::make_unique<SWTexture>(config);
} }
@@ -77,16 +77,17 @@ public:
}; };
std::unique_ptr<AbstractShader> std::unique_ptr<AbstractShader>
SWGfx::CreateShaderFromSource(ShaderStage stage, [[maybe_unused]] std::string_view source, SWGfx::CreateShaderFromSource(ShaderStage stage, std::string_view /* source */,
[[maybe_unused]] VideoCommon::ShaderIncluder* shader_includer, VideoCommon::ShaderIncluder* /* shader_includer */,
[[maybe_unused]] std::string_view name) std::string_view /* name */)
{ {
return std::make_unique<SWShader>(stage); return std::make_unique<SWShader>(stage);
} }
std::unique_ptr<AbstractShader> std::unique_ptr<AbstractShader> SWGfx::CreateShaderFromBinary(ShaderStage stage,
SWGfx::CreateShaderFromBinary(ShaderStage stage, const void* data, size_t length, const void* /* data */,
[[maybe_unused]] std::string_view name) size_t /* length */,
std::string_view /* name */)
{ {
return std::make_unique<SWShader>(stage); return std::make_unique<SWShader>(stage);
} }
+1 -1
View File
@@ -143,7 +143,7 @@ void InvalidateAll()
// On invalidate cache: // On invalidate cache:
// 1. invalidate all texture units. // 1. invalidate all texture units.
void Invalidate([[maybe_unused]] u32 param) void Invalidate(u32 /* param */)
{ {
// The exact arguments of Invalidate commands is currently unknown. // The exact arguments of Invalidate commands is currently unknown.
// It appears to contain the TMEM address and a size. // It appears to contain the TMEM address and a size.
@@ -24,7 +24,7 @@ constexpr float PosScale(T val, float scale)
} }
template <> template <>
constexpr float PosScale(float val, [[maybe_unused]] float scale) constexpr float PosScale(float val, float /* scale */)
{ {
return val; return val;
} }
@@ -26,7 +26,7 @@ constexpr float TCScale(T val, float scale)
} }
template <> template <>
constexpr float TCScale(float val, [[maybe_unused]] float scale) constexpr float TCScale(float val, float /* scale */)
{ {
return val; return val;
} }