So here is my problem, im trying to learn some code and im just playing with changing and exploring some new ways to write it, but I realized that If the declaration with the {} is not the last variable it doesnt work, (if i change the places of m_belowScene and m_overscene it works tho).
My modification:
SceneManager::SceneManager()
: m_scene(std::make_shared<PolyGraphicNode>()),
m_cplSign(std::make_shared<CPLSymbol>(0.05, 0.2, 0.5)),
m_belowScene(std::make_shared<PolyGraphicNode>()){
std::shared_ptr<CPLSymbol> symbol = std::make_shared<CPLSymbol>(0.01, 0.04, 0.1, CPL_NODE);
m_belowScene->append(symbol);
}
m_overScene(std::make_shared<PolyGraphicNode>());
the proper way is this
SceneManager::SceneManager()
: m_scene(std::make_shared<PolyGraphicNode>()),
m_cplSign(std::make_shared<CPLSymbol>(0.05, 0.2, 0.5)),
m_overScene(std::make_shared<PolyGraphicNode>()),
m_belowScene(std::make_shared<PolyGraphicNode>()){
std::shared_ptr<CPLSymbol> symbol = std::make_shared<CPLSymbol>(0.01, 0.04, 0.1, CPL_NODE);
m_belowScene->append(symbol);
}