From 57454e90a7c9d507a979a79474d70554727422b7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 3 Jun 2019 19:37:33 -0400 Subject: [PATCH] Core/Analytics: Make MakeUniqueId() a const member function This function doesn't modify instance state, so we can mark it as const. --- Source/Core/Core/Analytics.cpp | 2 +- Source/Core/Core/Analytics.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Analytics.cpp b/Source/Core/Core/Analytics.cpp index d9e8835023..24df4af02b 100644 --- a/Source/Core/Core/Analytics.cpp +++ b/Source/Core/Core/Analytics.cpp @@ -101,7 +101,7 @@ void DolphinAnalytics::GenerateNewIdentity() SConfig::GetInstance().SaveSettings(); } -std::string DolphinAnalytics::MakeUniqueId(std::string_view data) +std::string DolphinAnalytics::MakeUniqueId(std::string_view data) const { std::array digest; const auto input = std::string{m_unique_id}.append(data); diff --git a/Source/Core/Core/Analytics.h b/Source/Core/Core/Analytics.h index c622469ee9..d21404a2ab 100644 --- a/Source/Core/Core/Analytics.h +++ b/Source/Core/Core/Analytics.h @@ -89,7 +89,7 @@ private: // Returns a unique ID derived on the global unique ID, hashed with some // report-specific data. This avoid correlation between different types of // events. - std::string MakeUniqueId(std::string_view data); + std::string MakeUniqueId(std::string_view data) const; // Unique ID. This should never leave the application. Only used derived // values created by MakeUniqueId.