*why* did I think I wanted to separately allocate there??

master
zetaPRIME 2022-03-10 19:27:29 -05:00
parent 93c5fc0611
commit c069f5b9f3
1 changed files with 1 additions and 2 deletions

View File

@ -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();