mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Compiler: Use [[maybe_unused]] in the Windows DOLPHIN_UNUSED macro
The required version of MSVC already supports [[maybe_unused]], so we can utilize this here. When GCC 7 and clang 3.9 become hard requirements, we can eliminate this macro entirely and replace it with [[maybe_unused]].
This commit is contained in:
parent
d8f6d60189
commit
7b11ce3dd2
@ -4,12 +4,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// TODO: Replace this with [[maybe_unused]] directly when GCC 7 and clang 3.9
|
||||
// are hard requirements.
|
||||
#if defined(__GNUC__) || __clang__
|
||||
// Disable "unused function" warnings for the ones manually marked as such.
|
||||
#define DOLPHIN_UNUSED __attribute__((unused))
|
||||
#else
|
||||
// Not sure MSVC even checks this...
|
||||
#define DOLPHIN_UNUSED
|
||||
#define DOLPHIN_UNUSED [[maybe_unused]]
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user