mirror of https://github.com/aria2/aria2
				
				
				
			Fix a bad std::move in HttpConnection
C++ Standard says that the order of evaluation of arguments is unspecified. Even if it wasn't, std::move would run first, invalidating the httpRequest smartptr, so that httpRequest->createRequest() would be executed on the invalid ptr. Some compilers might be smart enough to correct this error, clang XCode Edition surely is not (not should it).pull/106/head
							parent
							
								
									3f5f1e26d9
								
							
						
					
					
						commit
						fc6318d23f
					
				|  | @ -123,7 +123,8 @@ void HttpConnection::sendRequest | |||
| void HttpConnection::sendRequest | ||||
| (std::unique_ptr<HttpRequest> httpRequest) | ||||
| { | ||||
|   sendRequest(std::move(httpRequest), httpRequest->createRequest()); | ||||
|   auto req = httpRequest->createRequest(); | ||||
|   sendRequest(std::move(httpRequest), req); | ||||
| } | ||||
| 
 | ||||
| void HttpConnection::sendProxyRequest | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Nils Maier
						Nils Maier