Mercurial > octave-nkf
comparison liboctave/util/url-transfer.cc @ 17598:d8d71c89fff2
eliminate unnecessary member variable in url_base_transfer class
* url-transfer.h, url-transfer.cc (base_url_transfer::userpw):
Delete member variable.
(curl_transfer::init): Declare userpwd as a local variable.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 07 Oct 2013 22:35:55 -0400 |
parents | e5932e528721 |
children | 9e507e30c9ea |
comparison
equal
deleted
inserted
replaced
17597:e5932e528721 | 17598:d8d71c89fff2 |
---|---|
656 { | 656 { |
657 // No data transfer by default | 657 // No data transfer by default |
658 SETOPT (CURLOPT_NOBODY, 1); | 658 SETOPT (CURLOPT_NOBODY, 1); |
659 | 659 |
660 // Set the username and password | 660 // Set the username and password |
661 userpwd = user; | 661 std::string userpwd = user; |
662 if (! passwd.empty ()) | 662 if (! passwd.empty ()) |
663 userpwd += ":" + passwd; | 663 userpwd += ":" + passwd; |
664 if (! userpwd.empty ()) | 664 if (! userpwd.empty ()) |
665 SETOPT (CURLOPT_USERPWD, userpwd.c_str ()); | 665 SETOPT (CURLOPT_USERPWD, userpwd.c_str ()); |
666 | 666 |