mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-21 07:31:26 +02:00
Remove unnecessary string duplication (http_init creates an internal copy of the proxy string)
This commit is contained in:
@@ -121,12 +121,7 @@ void Client::Initialise(std::string proxyString)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(proxyString.length())
|
if(proxyString.length())
|
||||||
{
|
http_init(proxyString.c_str());
|
||||||
char *proxy = new char[proxyString.length() + 1];
|
|
||||||
std::strcpy (proxy, proxyString.c_str());
|
|
||||||
http_init(proxy);
|
|
||||||
delete[] proxy;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
http_init(NULL);
|
http_init(NULL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user