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-01-22 21:37:07 +0100
commitb7672a6d2d999489a188c539de7d01f5042fdee5 (patch)
tree08de9278dfee1ccf6932a4d0c00ad705ef0be234 /src/lib
parent6c2ab818ffb436b01668ce264d893bd399df79ed (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 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 {};
}
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;