*why* did I think I wanted to separately allocate there??
parent
93c5fc0611
commit
c069f5b9f3
|
@ -185,8 +185,7 @@ std::shared_ptr<Project> FileOps::loadProject(QString fileName, bool asTemplate)
|
|||
if (auto v = root.at(1); !v.isInteger() || v.toInteger() > XYBRID_VERSION) return nullptr; // invalid version or too new
|
||||
if (!root.at(2).isMap()) return nullptr; // so close, but... nope
|
||||
|
||||
// intentionally allocate project and control block separately
|
||||
std::shared_ptr<Project> project(new Project());
|
||||
auto project = std::make_shared<Project>();
|
||||
if (!asTemplate) project->fileName = fileName;
|
||||
QCborMap main = root.at(2).toMap();
|
||||
|
||||
|
|
Loading…
Reference in New Issue