diff options
| author | Dr. Dystopia <jonis9898@hotmail.com> | 2025-03-26 17:00:13 +0100 |
|---|---|---|
| committer | Dr. Dystopia <jonis9898@hotmail.com> | 2025-05-10 13:05:54 +0200 |
| commit | cb30862cfb808107f58087ca06fae41744d75e6c (patch) | |
| tree | 1332261a284ffee61f579184f21b5bcde8d06ed9 /Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp | |
| parent | b2e5d6df259e0a16817fdf70088636fedcb49176 (diff) | |
DolphinQT/Netplay: Make variables constant
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp index f99a493a77..8791cb9e92 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp @@ -36,19 +36,19 @@ NetPlaySetupDialog::NetPlaySetupDialog(const GameListModel& game_list_model, QWi CreateMainLayout(); - bool use_index = Config::Get(Config::NETPLAY_USE_INDEX); - std::string index_region = Config::Get(Config::NETPLAY_INDEX_REGION); - std::string index_name = Config::Get(Config::NETPLAY_INDEX_NAME); - std::string index_password = Config::Get(Config::NETPLAY_INDEX_PASSWORD); - std::string nickname = Config::Get(Config::NETPLAY_NICKNAME); - std::string traversal_choice = Config::Get(Config::NETPLAY_TRAVERSAL_CHOICE); - int connect_port = Config::Get(Config::NETPLAY_CONNECT_PORT); - int host_port = Config::Get(Config::NETPLAY_HOST_PORT); - int host_listen_port = Config::Get(Config::NETPLAY_LISTEN_PORT); - bool enable_chunked_upload_limit = Config::Get(Config::NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT); - u32 chunked_upload_limit = Config::Get(Config::NETPLAY_CHUNKED_UPLOAD_LIMIT); + const bool use_index = Config::Get(Config::NETPLAY_USE_INDEX); + const std::string index_region = Config::Get(Config::NETPLAY_INDEX_REGION); + const std::string index_name = Config::Get(Config::NETPLAY_INDEX_NAME); + const std::string index_password = Config::Get(Config::NETPLAY_INDEX_PASSWORD); + const std::string nickname = Config::Get(Config::NETPLAY_NICKNAME); + const std::string traversal_choice = Config::Get(Config::NETPLAY_TRAVERSAL_CHOICE); + const int connect_port = Config::Get(Config::NETPLAY_CONNECT_PORT); + const int host_port = Config::Get(Config::NETPLAY_HOST_PORT); + const int host_listen_port = Config::Get(Config::NETPLAY_LISTEN_PORT); + const bool enable_chunked_upload_limit = Config::Get(Config::NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT); + const u32 chunked_upload_limit = Config::Get(Config::NETPLAY_CHUNKED_UPLOAD_LIMIT); #ifdef USE_UPNP - bool use_upnp = Config::Get(Config::NETPLAY_USE_UPNP); + const bool use_upnp = Config::Get(Config::NETPLAY_USE_UPNP); m_host_upnp->setChecked(use_upnp); #endif @@ -305,7 +305,7 @@ void NetPlaySetupDialog::OnConnectionTypeChanged(int index) m_reset_traversal_button->setHidden(index == 0); - std::string address = + const std::string address = index == 0 ? Config::Get(Config::NETPLAY_ADDRESS) : Config::Get(Config::NETPLAY_HOST_CODE); m_ip_label->setText(index == 0 ? tr("IP Address:") : tr("Host Code:")); |
