Kaynağa Gözat

Missed a few replacements of content.find

IceCryptonym 6 yıl önce
ebeveyn
işleme
7baa77ef7e

+ 3 - 3
src/WallpaperEngine/Core/CProject.cpp

@@ -18,9 +18,9 @@ CProject* CProject::fromFile (const irr::io::path& filename)
 {
     json content = json::parse (WallpaperEngine::FileSystem::loadFullFile (filename));
 
-    auto title = jsonFindValueRequired (&content, "title", "Project title missing");
-    auto type = jsonFindValueRequired (&content, "title", "Project type missing");
-    auto file = jsonFindValueRequired (&content, "title", "Project's main file missing");
+    auto title = jsonFindRequired (&content, "title", "Project title missing");
+    auto type = jsonFindRequired (&content, "title", "Project type missing");
+    auto file = jsonFindRequired (&content, "title", "Project's main file missing");
     auto general = content.find ("general");
 
     CProject* project = new CProject (

+ 1 - 1
src/WallpaperEngine/Core/Core.cpp

@@ -60,7 +60,7 @@ irr::video::SColor Core::atoSColor (const std::string& str)
     return Core::atoSColor (str.c_str ());
 }
 
-nlohmann::detail::iter_impl<nlohmann::json> jsonFindRequired (nlohmann::json *data, const char *key, const char *notFoundMsg)
+nlohmann::detail::iter_impl<nlohmann::json> Core::jsonFindRequired (nlohmann::json *data, const char *key, const char *notFoundMsg)
 {
     auto value = data->find (key);
     if (value == data->end ())