2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

yuzu/main: Apply the [[maybe_unused]] attribute to the parameter of SetDiscordEnabled()

Depending on whether or not USE_DISCORD_PRESENCE is defined, the "state"
parameter can be used or unused. If USE_DISCORD_PRESENCE is not defined,
the parameter will be considered unused, which can lead to compiler
warnings. So, we can explicitly mark it with [[maybe_unused]] to inform
the compiler that this is intentional.
This commit is contained in:
Lioncash 2018-10-13 10:10:27 -04:00
parent 1584fb6b38
commit 53a0221484

View file

@ -1565,7 +1565,7 @@ void GMainWindow::UpdateUITheme() {
emit UpdateThemedIcons(); emit UpdateThemedIcons();
} }
void GMainWindow::SetDiscordEnabled(bool state) { void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) {
#ifdef USE_DISCORD_PRESENCE #ifdef USE_DISCORD_PRESENCE
if (state) { if (state) {
discord_rpc = std::make_unique<DiscordRPC::DiscordImpl>(); discord_rpc = std::make_unique<DiscordRPC::DiscordImpl>();