From: James Turner Date: Sun, 22 Nov 2015 22:40:07 +0000 (+0000) Subject: More whitespace fixes. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=23b8c86e78335df44129100da1d428de8987dfcd;p=simgear.git More whitespace fixes. --- diff --git a/simgear/io/HTTPRequest.cxx b/simgear/io/HTTPRequest.cxx index b9466ebf..90b30719 100644 --- a/simgear/io/HTTPRequest.cxx +++ b/simgear/io/HTTPRequest.cxx @@ -207,7 +207,7 @@ std::string Request::scheme() const if (firstColon > 0) { return url().substr(0, firstColon); } - + return ""; // couldn't parse scheme } @@ -219,20 +219,20 @@ std::string Request::path() const if (schemeEnd < 0) { return ""; // couldn't parse scheme } - + int hostEnd = u.find('/', schemeEnd + 3); if (hostEnd < 0) { -// couldn't parse host, or URL looks like 'http://foo.com' (no trailing '/') -// fixup to root resource path: '/' - return "/"; +// couldn't parse host, or URL looks like 'http://foo.com' (no trailing '/') +// fixup to root resource path: '/' + return "/"; } - + int query = u.find('?', hostEnd + 1); if (query < 0) { // all remainder of URL is path return u.substr(hostEnd); } - + return u.substr(hostEnd, query - hostEnd); } @@ -244,7 +244,7 @@ std::string Request::query() const if (query < 0) { return ""; //no query string found } - + return u.substr(query); //includes question mark } diff --git a/simgear/io/test_HTTP.cxx b/simgear/io/test_HTTP.cxx index ea57837b..700eace4 100644 --- a/simgear/io/test_HTTP.cxx +++ b/simgear/io/test_HTTP.cxx @@ -46,7 +46,7 @@ char body2[body2Size]; cerr << "failed:" << #a << endl; \ exit(1); \ } - + class TestRequest : public HTTP::Request { public: