summaryrefslogtreecommitdiff
path: root/src/lib/update.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-21 01:15:32 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-21 01:15:32 +0100
commite60bb3e51bd1508b149e6b8f6608f09b5196ae26 (patch)
treea7a5b937c9ae138d4eebca8d5130d308bf9ae420 /src/lib/update.cc
parentf07d5125a7b609320682689abe40781f096ca25e (diff)
No-op: remove all trailing whitespace.
Diffstat (limited to 'src/lib/update.cc')
-rw-r--r--src/lib/update.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/update.cc b/src/lib/update.cc
index f433ff991..24cd28b16 100644
--- a/src/lib/update.cc
+++ b/src/lib/update.cc
@@ -64,7 +64,7 @@ UpdateChecker::UpdateChecker ()
curl_easy_setopt (_curl, CURLOPT_WRITEFUNCTION, write_callback_wrapper);
curl_easy_setopt (_curl, CURLOPT_WRITEDATA, this);
curl_easy_setopt (_curl, CURLOPT_TIMEOUT, 20);
-
+
string const agent = "dcpomatic/" + string (dcpomatic_version);
curl_easy_setopt (_curl, CURLOPT_USERAGENT, agent.c_str ());
@@ -74,7 +74,7 @@ UpdateChecker::UpdateChecker ()
UpdateChecker::~UpdateChecker ()
{
/* We are not cleaning up our thread, but hey well */
-
+
curl_easy_cleanup (_curl);
curl_global_cleanup ();
delete[] _buffer;
@@ -100,12 +100,12 @@ UpdateChecker::thread ()
}
--_to_do;
lock.unlock ();
-
+
try {
_offset = 0;
/* Perform the request */
-
+
int r = curl_easy_perform (_curl);
if (r != CURLE_OK) {
set_state (FAILED);
@@ -113,7 +113,7 @@ UpdateChecker::thread ()
}
/* Parse the reply */
-
+
_buffer[_offset] = '\0';
string s (_buffer);
cxml::Document doc ("Update");
@@ -133,7 +133,7 @@ UpdateChecker::thread ()
if (version_less_than (dcpomatic_version, stable)) {
_stable = stable;
}
-
+
if (Config::instance()->check_for_test_updates() && version_less_than (dcpomatic_version, test)) {
_test = test;
}
@@ -148,7 +148,7 @@ UpdateChecker::thread ()
}
}
}
-
+
size_t
UpdateChecker::write_callback (void* data, size_t size, size_t nmemb)
{
@@ -203,13 +203,13 @@ UpdateChecker::version_less_than (string const & a, string const & b)
} else {
am = raw_convert<int> (ap[2]);
}
-
+
float bm;
if (ends_with (bp[2], "devel")) {
bm = raw_convert<int> (bp[2].substr (0, bp[2].length() - 5)) + 0.5;
} else {
bm = raw_convert<int> (bp[2]);
}
-
+
return am < bm;
}