NOISSUE fix a bunch of valgrind errors
This commit is contained in:
parent
a0ef20a264
commit
cd57e354fe
@ -53,7 +53,9 @@ public: /* methods */
|
||||
auto fname = m_entity->localFilename();
|
||||
try
|
||||
{
|
||||
m_entity->parse(Json::requireObject(Json::requireDocument(data, fname), fname));
|
||||
auto doc = Json::requireDocument(data, fname);
|
||||
auto obj = Json::requireObject(doc, fname);
|
||||
m_entity->parse(obj);
|
||||
return true;
|
||||
}
|
||||
catch (const Exception &e)
|
||||
@ -87,7 +89,9 @@ bool Meta::BaseEntity::loadLocalFile()
|
||||
// TODO: check if the file has the expected checksum
|
||||
try
|
||||
{
|
||||
parse(Json::requireObject(Json::requireDocument(fname, fname), fname));
|
||||
auto doc = Json::requireDocument(fname, fname);
|
||||
auto obj = Json::requireObject(doc, fname);
|
||||
parse(obj);
|
||||
return true;
|
||||
}
|
||||
catch (const Exception &e)
|
||||
|
@ -9,7 +9,6 @@
|
||||
class MinecraftInstance;
|
||||
using ComponentContainer = QList<ComponentPtr>;
|
||||
using ComponentIndex = QMap<QString, ComponentPtr>;
|
||||
using ConnectionList = QList<QMetaObject::Connection>;
|
||||
|
||||
struct PackProfileData
|
||||
{
|
||||
|
@ -184,7 +184,8 @@ void readIndex(const QString & path, QMap<QString, Language>& languages)
|
||||
int index = 1;
|
||||
try
|
||||
{
|
||||
auto doc = Json::requireObject(Json::requireDocument(data));
|
||||
auto toplevel_doc = Json::requireDocument(data);
|
||||
auto doc = Json::requireObject(toplevel_doc);
|
||||
auto file_type = Json::requireString(doc, "file_type");
|
||||
if(file_type != "MMC-TRANSLATION-INDEX")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user