mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-27 08:44:17 +01:00
Merge pull request #1126 from lioncash/telem
telemetry_session: Don't allocate std::string instances for program lifetime in GetTelemetryId() and RegenerateTelemetryId()
This commit is contained in:
commit
c4ce7e456a
@ -19,7 +19,7 @@ static u64 GenerateTelemetryId() {
|
|||||||
|
|
||||||
u64 GetTelemetryId() {
|
u64 GetTelemetryId() {
|
||||||
u64 telemetry_id{};
|
u64 telemetry_id{};
|
||||||
static const std::string& filename{FileUtil::GetUserPath(FileUtil::UserPath::ConfigDir) +
|
const std::string filename{FileUtil::GetUserPath(FileUtil::UserPath::ConfigDir) +
|
||||||
"telemetry_id"};
|
"telemetry_id"};
|
||||||
|
|
||||||
if (FileUtil::Exists(filename)) {
|
if (FileUtil::Exists(filename)) {
|
||||||
@ -44,7 +44,7 @@ u64 GetTelemetryId() {
|
|||||||
|
|
||||||
u64 RegenerateTelemetryId() {
|
u64 RegenerateTelemetryId() {
|
||||||
const u64 new_telemetry_id{GenerateTelemetryId()};
|
const u64 new_telemetry_id{GenerateTelemetryId()};
|
||||||
static const std::string& filename{FileUtil::GetUserPath(FileUtil::UserPath::ConfigDir) +
|
const std::string filename{FileUtil::GetUserPath(FileUtil::UserPath::ConfigDir) +
|
||||||
"telemetry_id"};
|
"telemetry_id"};
|
||||||
|
|
||||||
FileUtil::IOFile file(filename, "wb");
|
FileUtil::IOFile file(filename, "wb");
|
||||||
|
Loading…
Reference in New Issue
Block a user