diff options
| author | 2018-10-13 10:10:27 -0400 | |
|---|---|---|
| committer | 2018-10-13 10:10:29 -0400 | |
| commit | 53a022148414d8bf0f24bea7be2860af730b7746 (patch) | |
| tree | 0b89fa7b275920a7552674eeda4b7aba442151c4 /src | |
| parent | Merge pull request #1409 from DarkLordZach/key-derivation (diff) | |
| download | yuzu-53a022148414d8bf0f24bea7be2860af730b7746.tar.gz yuzu-53a022148414d8bf0f24bea7be2860af730b7746.tar.xz yuzu-53a022148414d8bf0f24bea7be2860af730b7746.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index fc186dc2d..788dd9b34 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -1565,7 +1565,7 @@ void GMainWindow::UpdateUITheme() { | |||
| 1565 | emit UpdateThemedIcons(); | 1565 | emit UpdateThemedIcons(); |
| 1566 | } | 1566 | } |
| 1567 | 1567 | ||
| 1568 | void GMainWindow::SetDiscordEnabled(bool state) { | 1568 | void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) { |
| 1569 | #ifdef USE_DISCORD_PRESENCE | 1569 | #ifdef USE_DISCORD_PRESENCE |
| 1570 | if (state) { | 1570 | if (state) { |
| 1571 | discord_rpc = std::make_unique<DiscordRPC::DiscordImpl>(); | 1571 | discord_rpc = std::make_unique<DiscordRPC::DiscordImpl>(); |