Mercurial > octave-nkf
comparison liboctave/util/url-transfer.h @ 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 | 43b9181340fb |
children | d63878346099 |
comparison
equal
deleted
inserted
replaced
17597:e5932e528721 | 17598:d8d71c89fff2 |
---|---|
45 public: | 45 public: |
46 | 46 |
47 friend class url_transfer; | 47 friend class url_transfer; |
48 | 48 |
49 base_url_transfer (void) | 49 base_url_transfer (void) |
50 : count (1), host_or_url (), userpwd (), valid (false), ftp (false), | 50 : count (1), host_or_url (), valid (false), ftp (false), |
51 ascii_mode (false), ok (true), errmsg (), | 51 ascii_mode (false), ok (true), errmsg (), |
52 curr_istream (&std::cin), curr_ostream (&std::cout) | 52 curr_istream (&std::cin), curr_ostream (&std::cout) |
53 { } | 53 { } |
54 | 54 |
55 base_url_transfer (const std::string& host, | 55 base_url_transfer (const std::string& host, |
56 const std::string& /* user_arg */, | 56 const std::string& /* user_arg */, |
57 const std::string& /* passwd */, | 57 const std::string& /* passwd */, |
58 std::ostream& os) | 58 std::ostream& os) |
59 : count (1), host_or_url (host), userpwd (), valid (false), ftp (true), | 59 : count (1), host_or_url (host), valid (false), ftp (true), |
60 ascii_mode (false), ok (true), errmsg (), curr_istream (&std::cin), | 60 ascii_mode (false), ok (true), errmsg (), curr_istream (&std::cin), |
61 curr_ostream (&os) { } | 61 curr_ostream (&os) { } |
62 | 62 |
63 base_url_transfer (const std::string& url, std::ostream& os) | 63 base_url_transfer (const std::string& url, std::ostream& os) |
64 : count (1), host_or_url (url), userpwd (), valid (false), ftp (false), | 64 : count (1), host_or_url (url), valid (false), ftp (false), |
65 ascii_mode (false), ok (true), errmsg (), | 65 ascii_mode (false), ok (true), errmsg (), |
66 curr_istream (&std::cin), curr_ostream (&os) { } | 66 curr_istream (&std::cin), curr_ostream (&os) { } |
67 | 67 |
68 virtual ~base_url_transfer (void) { } | 68 virtual ~base_url_transfer (void) { } |
69 | 69 |
139 // Reference count. | 139 // Reference count. |
140 octave_refcount<size_t> count; | 140 octave_refcount<size_t> count; |
141 | 141 |
142 // Host for ftp transfers or full URL for http requests. | 142 // Host for ftp transfers or full URL for http requests. |
143 std::string host_or_url; | 143 std::string host_or_url; |
144 std::string userpwd; | |
145 bool valid; | 144 bool valid; |
146 bool ftp; | 145 bool ftp; |
147 bool ascii_mode; | 146 bool ascii_mode; |
148 bool ok; | 147 bool ok; |
149 std::string errmsg; | 148 std::string errmsg; |