summaryrefslogtreecommitdiff
path: root/src/httpfetch.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-04-20 00:12:52 +0200
committerGitHub <noreply@github.com>2017-04-20 00:12:52 +0200
commitf98bbe193e0093aca8d8957cec82fdbd28639915 (patch)
tree19879fbca595d4e8cddfa8d7d069b7f78016a713 /src/httpfetch.cpp
parentf3fe62a0bf9e775b3e6e838f104ab605a2238792 (diff)
downloadminetest-f98bbe193e0093aca8d8957cec82fdbd28639915.tar.gz
minetest-f98bbe193e0093aca8d8957cec82fdbd28639915.tar.bz2
minetest-f98bbe193e0093aca8d8957cec82fdbd28639915.zip
Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)
* Also remove 2 non declared but defined functions * Make some functions around const ref changes const
Diffstat (limited to 'src/httpfetch.cpp')
-rw-r--r--src/httpfetch.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp
index 21400355a..3b3f5d331 100644
--- a/src/httpfetch.cpp
+++ b/src/httpfetch.cpp
@@ -40,16 +40,15 @@ Mutex g_httpfetch_mutex;
std::map<unsigned long, std::queue<HTTPFetchResult> > g_httpfetch_results;
PcgRandom g_callerid_randomness;
-HTTPFetchRequest::HTTPFetchRequest()
+HTTPFetchRequest::HTTPFetchRequest() :
+ url(""),
+ caller(HTTPFETCH_DISCARD),
+ request_id(0),
+ timeout(g_settings->getS32("curl_timeout")),
+ connect_timeout(timeout),
+ multipart(false),
+ useragent(std::string(PROJECT_NAME_C "/") + g_version_hash + " (" + porting::get_sysinfo() + ")")
{
- url = "";
- caller = HTTPFETCH_DISCARD;
- request_id = 0;
- timeout = g_settings->getS32("curl_timeout");
- connect_timeout = timeout;
- multipart = false;
-
- useragent = std::string(PROJECT_NAME_C "/") + g_version_hash + " (" + porting::get_sysinfo() + ")";
}