diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/internet.cc | 4 | ||||
| -rw-r--r-- | src/lib/internet.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/internet.cc b/src/lib/internet.cc index ca72399f3..4fb6c7cb3 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 {}; } diff --git a/src/lib/internet.h b/src/lib/internet.h index 25513e666..f3cd2c6b4 100644 --- a/src/lib/internet.h +++ b/src/lib/internet.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net> + Copyright (C) 2014-2022 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -18,8 +18,9 @@ */ -#include <boost/optional.hpp> + #include <boost/filesystem.hpp> +#include <boost/optional.hpp> class ScopedTemporary; |
