Browse Source

std:;string

Signed-off-by: crueter <crueter@eden-emu.dev>
pull/3021/head
crueter 3 months ago
parent
commit
c5116a0545
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 4
      src/common/logging/backend.cpp

4
src/common/logging/backend.cpp

@ -112,7 +112,7 @@ public:
// This must be a static otherwise it would get checked on EVERY // This must be a static otherwise it would get checked on EVERY
// instance of logging an entry... // instance of logging an entry...
static std::string username = []() -> std::string { static std::string username = []() -> std::string {
auto* s = getenv("USER");
const char* s = getenv("USER");
if (s == nullptr) if (s == nullptr)
s = getenv("USERNAME"); s = getenv("USERNAME");
@ -120,7 +120,7 @@ public:
s = getenv("LOGNAME"); s = getenv("LOGNAME");
if (s == nullptr) if (s == nullptr)
return "";
return std::string{};
return std::string{s}; return std::string{s};
}(); }();

Loading…
Cancel
Save