summaryrefslogtreecommitdiff
path: root/src/httpfetch.h
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.h
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.h')
-rw-r--r--src/httpfetch.h36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/httpfetch.h b/src/httpfetch.h
index f57ed8789..d64b80b66 100644
--- a/src/httpfetch.h
+++ b/src/httpfetch.h
@@ -77,25 +77,23 @@ struct HTTPFetchResult
unsigned long caller;
unsigned long request_id;
- HTTPFetchResult()
- {
- succeeded = false;
- timeout = false;
- response_code = 0;
- data = "";
- caller = HTTPFETCH_DISCARD;
- request_id = 0;
- }
-
- HTTPFetchResult(const HTTPFetchRequest &fetch_request)
- {
- succeeded = false;
- timeout = false;
- response_code = 0;
- data = "";
- caller = fetch_request.caller;
- request_id = fetch_request.request_id;
- }
+ HTTPFetchResult() :
+ succeeded(false),
+ timeout(false),
+ response_code(0),
+ data(""),
+ caller(HTTPFETCH_DISCARD),
+ request_id(0)
+ {}
+
+ HTTPFetchResult(const HTTPFetchRequest &fetch_request) :
+ succeeded(false),
+ timeout(false),
+ response_code(0),
+ data(""),
+ caller(fetch_request.caller),
+ request_id(fetch_request.request_id)
+ {}
};