From eea5987f379cd76786ace382da09dd687ecca28a Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Fri, 25 Aug 2023 20:13:37 -0400 Subject: add workaround for compiling with spdlog and incompatible libfmt (fixes #214) --- src/remoteauth/remoteauthclient.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/remoteauth/remoteauthclient.cpp') diff --git a/src/remoteauth/remoteauthclient.cpp b/src/remoteauth/remoteauthclient.cpp index 7653b78..5103c8d 100644 --- a/src/remoteauth/remoteauthclient.cpp +++ b/src/remoteauth/remoteauthclient.cpp @@ -111,9 +111,10 @@ void RemoteAuthClient::HandleGatewayPendingTicket(const nlohmann::json &j) { const auto encrypted_payload = Glib::Base64::decode(j.at("encrypted_user_payload").get()); const auto payload = Decrypt(reinterpret_cast(encrypted_payload.data()), encrypted_payload.size()); - m_log->trace("User payload: {}", std::string(payload.begin(), payload.end())); + const auto payload_str = std::string(payload.begin(), payload.end()); + m_log->trace("User payload: {}", payload_str); - const std::vector user_info = Glib::Regex::split_simple(":", std::string(payload.begin(), payload.end())); + const std::vector user_info = Glib::Regex::split_simple(":", payload_str); Snowflake user_id; std::string discriminator; std::string avatar_hash; @@ -140,7 +141,8 @@ void RemoteAuthClient::HandleGatewayCancel(const nlohmann::json &j) { void RemoteAuthClient::OnRemoteAuthLoginResponse(const std::optional &encrypted_token, DiscordError err) { if (!encrypted_token.has_value()) { - m_log->error("Remote auth login failed: {}", static_cast(err)); + const auto err_int = static_cast(err); + m_log->error("Remote auth login failed: {}", err_int); if (err == DiscordError::CAPTCHA_REQUIRED) { m_signal_error.emit("Discord is requiring a captcha. You must use a web browser to log in."); } else { -- cgit v1.2.3