mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00
Missed a few replacements of content.find
This commit is contained in:
parent
5122206d83
commit
7baa77ef7e
@ -18,9 +18,9 @@ CProject* CProject::fromFile (const irr::io::path& filename)
|
|||||||
{
|
{
|
||||||
json content = json::parse (WallpaperEngine::FileSystem::loadFullFile (filename));
|
json content = json::parse (WallpaperEngine::FileSystem::loadFullFile (filename));
|
||||||
|
|
||||||
auto title = jsonFindValueRequired (&content, "title", "Project title missing");
|
auto title = jsonFindRequired (&content, "title", "Project title missing");
|
||||||
auto type = jsonFindValueRequired (&content, "title", "Project type missing");
|
auto type = jsonFindRequired (&content, "title", "Project type missing");
|
||||||
auto file = jsonFindValueRequired (&content, "title", "Project's main file missing");
|
auto file = jsonFindRequired (&content, "title", "Project's main file missing");
|
||||||
auto general = content.find ("general");
|
auto general = content.find ("general");
|
||||||
|
|
||||||
CProject* project = new CProject (
|
CProject* project = new CProject (
|
||||||
|
@ -60,7 +60,7 @@ irr::video::SColor Core::atoSColor (const std::string& str)
|
|||||||
return Core::atoSColor (str.c_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);
|
auto value = data->find (key);
|
||||||
if (value == data->end ())
|
if (value == data->end ())
|
||||||
|
Loading…
Reference in New Issue
Block a user