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
commit e22551eae1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 25 additions and 22 deletions

View File

@ -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());
}

View File

@ -57,7 +57,7 @@ void Microphone::StreamInit()
{
}
void Microphone::StreamStart([[maybe_unused]] u32 sampling_rate)
void Microphone::StreamStart(u32 /* sampling_rate */)
{
}

View File

@ -34,7 +34,7 @@ bool NullGfx::SupportsUtilityDrawing() const
}
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);
}
@ -52,16 +52,17 @@ public:
};
std::unique_ptr<AbstractShader>
NullGfx::CreateShaderFromSource(ShaderStage stage, [[maybe_unused]] std::string_view source,
[[maybe_unused]] VideoCommon::ShaderIncluder* shader_includer,
[[maybe_unused]] std::string_view name)
NullGfx::CreateShaderFromSource(ShaderStage stage, std::string_view /* source */,
VideoCommon::ShaderIncluder* /* shader_includer */,
std::string_view /* name */)
{
return std::make_unique<NullShader>(stage);
}
std::unique_ptr<AbstractShader>
NullGfx::CreateShaderFromBinary(ShaderStage stage, const void* data, size_t length,
[[maybe_unused]] std::string_view name)
std::unique_ptr<AbstractShader> NullGfx::CreateShaderFromBinary(ShaderStage stage,
const void* /* data */,
size_t /* length */,
std::string_view /* name */)
{
return std::make_unique<NullShader>(stage);
}

View File

@ -235,9 +235,10 @@ OGLGfx::CreateShaderFromSource(ShaderStage stage, std::string_view source,
return OGLShader::CreateFromSource(stage, source, shader_includer, name);
}
std::unique_ptr<AbstractShader>
OGLGfx::CreateShaderFromBinary(ShaderStage stage, const void* data, size_t length,
[[maybe_unused]] std::string_view name)
std::unique_ptr<AbstractShader> OGLGfx::CreateShaderFromBinary(ShaderStage /* stage */,
const void* /* data */,
size_t /* length */,
std::string_view /* name */)
{
return nullptr;
}

View File

@ -35,7 +35,7 @@ bool SWGfx::SupportsUtilityDrawing() const
}
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);
}
@ -77,16 +77,17 @@ public:
};
std::unique_ptr<AbstractShader>
SWGfx::CreateShaderFromSource(ShaderStage stage, [[maybe_unused]] std::string_view source,
[[maybe_unused]] VideoCommon::ShaderIncluder* shader_includer,
[[maybe_unused]] std::string_view name)
SWGfx::CreateShaderFromSource(ShaderStage stage, std::string_view /* source */,
VideoCommon::ShaderIncluder* /* shader_includer */,
std::string_view /* name */)
{
return std::make_unique<SWShader>(stage);
}
std::unique_ptr<AbstractShader>
SWGfx::CreateShaderFromBinary(ShaderStage stage, const void* data, size_t length,
[[maybe_unused]] std::string_view name)
std::unique_ptr<AbstractShader> SWGfx::CreateShaderFromBinary(ShaderStage stage,
const void* /* data */,
size_t /* length */,
std::string_view /* name */)
{
return std::make_unique<SWShader>(stage);
}

View File

@ -143,7 +143,7 @@ void InvalidateAll()
// On invalidate cache:
// 1. invalidate all texture units.
void Invalidate([[maybe_unused]] u32 param)
void Invalidate(u32 /* param */)
{
// The exact arguments of Invalidate commands is currently unknown.
// It appears to contain the TMEM address and a size.

View File

@ -24,7 +24,7 @@ constexpr float PosScale(T val, float scale)
}
template <>
constexpr float PosScale(float val, [[maybe_unused]] float scale)
constexpr float PosScale(float val, float /* scale */)
{
return val;
}

View File

@ -26,7 +26,7 @@ constexpr float TCScale(T val, float scale)
}
template <>
constexpr float TCScale(float val, [[maybe_unused]] float scale)
constexpr float TCScale(float val, float /* scale */)
{
return val;
}