diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-21 23:38:14 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-22 21:37:07 +0100 |
| commit | b7672a6d2d999489a188c539de7d01f5042fdee5 (patch) | |
| tree | 08de9278dfee1ccf6932a4d0c00ad705ef0be234 /src/lib/internet.cc | |
| parent | 6c2ab818ffb436b01668ce264d893bd399df79ed (diff) | |
C++11 and general tidying.
Diffstat (limited to 'src/lib/internet.cc')
| -rw-r--r-- | src/lib/internet.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/internet.cc b/src/lib/internet.cc index 34e106977..8d22f6a84 100644 --- a/src/lib/internet.cc +++ b/src/lib/internet.cc @@ -113,7 +113,7 @@ get_from_url (string url, bool pasv, bool skip_pasv_ip, ScopedTemporary& temp) /* Maximum time is 20s */ curl_easy_setopt (curl, CURLOPT_TIMEOUT, 20); - CURLcode const cr = curl_easy_perform (curl); + auto const cr = curl_easy_perform (curl); temp.close (); curl_easy_cleanup (curl); @@ -121,7 +121,7 @@ get_from_url (string url, bool pasv, bool skip_pasv_ip, ScopedTemporary& temp) return String::compose (_("Download failed (%1 error %2)"), url, (int) cr); } - return optional<string>(); + return {}; } |
