From 86a3c8ce566f28112dc032aa48c40e12fde97be2 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Sun, 14 Sep 2014 20:46:45 -0400 Subject: Reduce indentation of HTTPFetchOngoing Also clean up some related things. --- src/mods.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/mods.cpp') diff --git a/src/mods.cpp b/src/mods.cpp index b4e075b1e..7d6b4f5f7 100644 --- a/src/mods.cpp +++ b/src/mods.cpp @@ -339,19 +339,14 @@ Json::Value getModstoreUrl(std::string url) bool special_http_header = true; - try{ + try { special_http_header = g_settings->getBool("modstore_disable_special_http_header"); - } - catch(SettingNotFoundException &e) { - } + } catch (SettingNotFoundException) {} if (special_http_header) { extra_headers.push_back("Accept: application/vnd.minetest.mmdb-v1+json"); - return fetchJsonValue(url, &extra_headers); - } - else { - return fetchJsonValue(url, NULL); } + return fetchJsonValue(url, special_http_header ? &extra_headers : NULL); } #endif -- cgit v1.2.3