Skip to content
Permalink
Browse files

Core/Analytics: Simplify static_assert

We can just use a std::array here to simplify the size calculation.
  • Loading branch information...
lioncash committed Jun 3, 2019
1 parent 7935c27 commit 2c2b9690bbb9e4cd5c6a27550adab53b95c3cac5
Showing with 3 additions and 3 deletions.
  1. +3 −3 Source/Core/Core/Analytics.cpp
@@ -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)

0 comments on commit 2c2b969

Please sign in to comment.
You can’t perform that action at this time.