]> git.lizzy.rs Git - minetest.git/blobdiff - src/mods.cpp
Increase default font_size
[minetest.git] / src / mods.cpp
index b4e075b1eae52b8d5202e1369ba7c274eb6c342e..6126de7a19d1b08b9edcd55ecd4255438cf4f021 100644 (file)
@@ -240,7 +240,7 @@ void ModConfiguration::addMods(std::vector<ModSpec> new_mods)
                for(std::vector<ModSpec>::const_iterator it = new_mods.begin();
                                it != new_mods.end(); ++it){
                        const ModSpec &mod = *it;
-                       if(mod.part_of_modpack != want_from_modpack)
+                       if(mod.part_of_modpack != (bool)want_from_modpack)
                                continue;
                        if(existing_mods.count(mod.name) == 0){
                                // GOOD CASE: completely new mod.
@@ -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