citra-emu
/
citra
Archived
1
0
Fork 0

citra_qt/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 committed by fearlessTobi
parent b01b94d843
commit 15ecc38ada
1 changed files with 1 additions and 1 deletions

View File

@ -1714,7 +1714,7 @@ void GMainWindow::RetranslateStatusBar() {
multiplayer_state->retranslateUi();
}
void GMainWindow::SetDiscordEnabled(bool state) {
void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) {
#ifdef USE_DISCORD_PRESENCE
if (state) {
discord_rpc = std::make_unique<DiscordRPC::DiscordImpl>();