Core/Analytics: Use inline on static member variables
Starting with C++17, this allows for the same behavior as the existing code, but without the need to manually write the out-of-class definitions as well.
This commit is contained in:
parent
ebf3de4d93
commit
ea9f887170
|
@ -39,9 +39,6 @@ namespace
|
||||||
constexpr const char* ANALYTICS_ENDPOINT = "https://analytics.dolphin-emu.org/report";
|
constexpr const char* ANALYTICS_ENDPOINT = "https://analytics.dolphin-emu.org/report";
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
std::mutex DolphinAnalytics::s_instance_mutex;
|
|
||||||
std::shared_ptr<DolphinAnalytics> DolphinAnalytics::s_instance;
|
|
||||||
|
|
||||||
#if defined(ANDROID)
|
#if defined(ANDROID)
|
||||||
static std::function<std::string(std::string)> s_get_val_func;
|
static std::function<std::string(std::string)> s_get_val_func;
|
||||||
void DolphinAnalytics::AndroidSetGetValFunc(std::function<std::string(std::string)> func)
|
void DolphinAnalytics::AndroidSetGetValFunc(std::function<std::string(std::string)> func)
|
||||||
|
|
|
@ -127,6 +127,6 @@ private:
|
||||||
|
|
||||||
// Shared pointer in order to allow for multithreaded use of the instance and
|
// Shared pointer in order to allow for multithreaded use of the instance and
|
||||||
// avoid races at reinitialization time.
|
// avoid races at reinitialization time.
|
||||||
static std::mutex s_instance_mutex;
|
static inline std::mutex s_instance_mutex;
|
||||||
static std::shared_ptr<DolphinAnalytics> s_instance;
|
static inline std::shared_ptr<DolphinAnalytics> s_instance;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue