diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2013-03-12 21:29:27 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2013-03-12 21:29:27 (GMT) |
| commit | 7a055a9d90ea3464bbdc314df423e2aa768ce2be (patch) | |
| tree | 6e238f5509f47c19ac402e37e4d0743bff81d05a /src/client/Client.cpp | |
| parent | 35b7f62d3b8dfac0475b691bf8422a25523345fd (diff) | |
| download | powder-7a055a9d90ea3464bbdc314df423e2aa768ce2be.zip powder-7a055a9d90ea3464bbdc314df423e2aa768ce2be.tar.gz | |
More unnecessary string duplication
Diffstat (limited to 'src/client/Client.cpp')
| -rw-r--r-- | src/client/Client.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/Client.cpp b/src/client/Client.cpp index cf1a5db..6267d91 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -121,7 +121,7 @@ void Client::Initialise(std::string proxyString) } if(proxyString.length()) - http_init(proxyString.c_str()); + http_init((char*)proxyString.c_str()); else http_init(NULL); @@ -411,12 +411,7 @@ void Client::SetProxy(std::string proxy) { http_done(); if(proxy.length()) - { - char *tempproxy = new char[proxy.length() + 1]; - std::strcpy (tempproxy, proxy.c_str()); - http_init(tempproxy); - delete[] tempproxy; - } + http_init((char*)proxy.c_str()); else http_init(NULL); } |
