summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-01-21 23:38:14 +0100
committerCarl Hetherington <cth@carlh.net>2022-03-09 17:04:02 +0100
commitcf65c2709664936940935996499ac87dc47515f0 (patch)
tree4eb00dddbf83e74ee0234d3d8279bff4ed688ba3 /src/lib
parentcda2e5441938ebca1c94afd96f9a3a93e7bf3a08 (diff)
C++11 and general tidying.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/internet.cc4
-rw-r--r--src/lib/internet.h5
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;