From 01dfd0f960b1cd500fbbe9b544a7c22cd0ab548a Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 27 Jul 2025 19:32:42 +0800 Subject: Shorten Discord-related local variable names and minimise difference from SL main. --- indra/newview/llappviewer.cpp | 16 ++++++++-------- indra/newview/llstartup.h | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d70287ac83..17f8c3e367 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5934,15 +5934,15 @@ void LLAppViewer::initDiscordSocial() void LLAppViewer::handleDiscordSocial() { - static const uint64_t DISCORD_APPLICATION_ID = 1393451183741599796; - discordpp::AuthorizationArgs discordAuthArgs{}; - discordAuthArgs.SetClientId(DISCORD_APPLICATION_ID); - discordAuthArgs.SetScopes(discordpp::Client::GetDefaultPresenceScopes()); - auto discordCodeVerifier = gDiscordClient->CreateAuthorizationCodeVerifier(); - discordAuthArgs.SetCodeChallenge(discordCodeVerifier.Challenge()); - gDiscordClient->Authorize(discordAuthArgs, [discordCodeVerifier](auto result, auto code, auto redirectUri) { + static const uint64_t APPLICATION_ID = 1393451183741599796; + discordpp::AuthorizationArgs args{}; + args.SetClientId(APPLICATION_ID); + args.SetScopes(discordpp::Client::GetDefaultPresenceScopes()); + auto codeVerifier = gDiscordClient->CreateAuthorizationCodeVerifier(); + args.SetCodeChallenge(codeVerifier.Challenge()); + gDiscordClient->Authorize(args, [codeVerifier](auto result, auto code, auto redirectUri) { if (result.Successful()) { - gDiscordClient->GetToken(DISCORD_APPLICATION_ID, code, discordCodeVerifier.Verifier(), redirectUri, [](discordpp::ClientResult result, std::string accessToken, std::string, discordpp::AuthorizationTokenType, int32_t, std::string) { + gDiscordClient->GetToken(APPLICATION_ID, code, codeVerifier.Verifier(), redirectUri, [](discordpp::ClientResult result, std::string accessToken, std::string, discordpp::AuthorizationTokenType, int32_t, std::string) { gDiscordClient->UpdateToken(discordpp::AuthorizationTokenType::Bearer, accessToken, [](discordpp::ClientResult result) { if (result.Successful()) gDiscordClient->Connect(); diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index c07926facb..a827fbc487 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -128,7 +128,6 @@ public: static bool startLLProxy(); // Initialize the SOCKS 5 proxy static LLViewerStats::PhaseMap& getPhases() { return *sPhases; } - private: friend class LLStartupListener; static LLSLURL sStartSLURL; -- cgit v1.2.3