mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Remove a lot of superfluous ifndef USE_CURL checks
This commit is contained in:
parent
99f565e8f2
commit
9a39848ba9
4 changed files with 7 additions and 17 deletions
|
@ -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++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue