summaryrefslogtreecommitdiff
path: root/src/convert_json.cpp
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-04-06 14:02:53 +0200
committersapier <Sapier at GMX dot net>2014-06-19 19:05:37 +0200
commit9a39848ba93eaa56f7f62921f8de7a19e3ed0713 (patch)
tree0a8fe2e5963bc6dbb2fd908162ad34d3737e8278 /src/convert_json.cpp
parent99f565e8f2dcc58dfd0351d49ca42b022639488a (diff)
downloadminetest-9a39848ba93eaa56f7f62921f8de7a19e3ed0713.tar.gz
minetest-9a39848ba93eaa56f7f62921f8de7a19e3ed0713.tar.bz2
minetest-9a39848ba93eaa56f7f62921f8de7a19e3ed0713.zip
Remove a lot of superfluous ifndef USE_CURL checks
Diffstat (limited to 'src/convert_json.cpp')
-rw-r--r--src/convert_json.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/convert_json.cpp b/src/convert_json.cpp
index 6f227e796..a6107aa64 100644
--- a/src/convert_json.cpp
+++ b/src/convert_json.cpp
@@ -32,19 +32,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "porting.h"
Json::Value fetchJsonValue(const std::string &url,
- struct curl_slist *chunk) {
-#if USE_CURL
+ struct curl_slist *chunk) {
HTTPFetchRequest fetchrequest;
HTTPFetchResult fetchresult;
fetchrequest.url = url;
fetchrequest.caller = HTTPFETCH_SYNC;
+#if USE_CURL
struct curl_slist* runptr = chunk;
while(runptr) {
fetchrequest.extra_headers.push_back(runptr->data);
runptr = runptr->next;
}
+#endif
httpfetch_sync(fetchrequest,fetchresult);
if (!fetchresult.succeeded) {
@@ -71,12 +72,12 @@ Json::Value fetchJsonValue(const std::string &url,
else {
return root;
}
-#endif
+
return Json::Value();
}
std::vector<ModStoreMod> readModStoreList(Json::Value& modlist) {
- std::vector<ModStoreMod> retval;
+ std::vector<ModStoreMod> retval;
if (modlist.isArray()) {
for (unsigned int i = 0; i < modlist.size(); i++)