mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Core/Analytics: Simplify static_assert
We can just use a std::array here to simplify the size calculation.
This commit is contained in:
parent
7935c27b52
commit
2c2b9690bb
@ -1,5 +1,6 @@
|
||||
#include "Core/Analytics.h"
|
||||
|
||||
#include <array>
|
||||
#include <cinttypes>
|
||||
#include <mbedtls/sha1.h>
|
||||
#include <memory>
|
||||
@ -138,12 +139,11 @@ void DolphinAnalytics::ReportGameStart()
|
||||
}
|
||||
|
||||
// Keep in sync with enum class GameQuirk definition.
|
||||
static const char* GAME_QUIRKS_NAMES[] = {
|
||||
constexpr std::array<const char*, 2> GAME_QUIRKS_NAMES{
|
||||
"icache-matters",
|
||||
"directly-reads-wiimote-input",
|
||||
};
|
||||
static_assert(sizeof(GAME_QUIRKS_NAMES) / sizeof(GAME_QUIRKS_NAMES[0]) ==
|
||||
static_cast<u32>(GameQuirk::COUNT),
|
||||
static_assert(GAME_QUIRKS_NAMES.size() == static_cast<u32>(GameQuirk::COUNT),
|
||||
"Game quirks names and enum definition are out of sync.");
|
||||
|
||||
void DolphinAnalytics::ReportGameQuirk(GameQuirk quirk)
|
||||
|
Loading…
x
Reference in New Issue
Block a user