# HG changeset patch # User Rik # Date 1591735520 25200 # Node ID 02a5da73a157ef3aabdf9273eb890b6328341eea # Parent c648cca864db4881948a6a39d137c7a8f30fcf30 Use std::array rather than std::vector in patch for (bug #54334). * resource-manager.cc (update_network_settings): Replace std::vector, which can change size at runtime, with std::array, which does not. diff -r c648cca864db -r 02a5da73a157 libgui/src/resource-manager.cc --- a/libgui/src/resource-manager.cc Mon Jun 08 21:59:17 2020 +0200 +++ b/libgui/src/resource-manager.cc Tue Jun 09 13:45:20 2020 -0700 @@ -353,7 +353,6 @@ if (m_settings->value (global_use_proxy.key, global_use_proxy.def).toBool ()) { // Use a proxy, collect all required information - QString proxy_type_string = m_settings->value (global_proxy_type.key, global_proxy_type.def).toString (); @@ -390,16 +389,16 @@ proxy_url.setPassword (pass); } - // The proxy data from the Environment variables + // The proxy data from environment variables if (proxy_type_string == global_proxy_all_types.at (2)) { - const std::vector env_vars = + const std::array env_vars = { "ALL_PROXY", "all_proxy", "HTTP_PROXY", "http_proxy", "HTTPS_PROXY", "https_proxy" }; unsigned int count = 0; - while ((! proxy_url.isValid ()) && (count < env_vars.size ())) + while (! proxy_url.isValid () && count < env_vars.size ()) { proxy_url = QUrl (QString::fromStdString (sys::env::getenv (env_vars[count])));