Skip to content

Commit

Permalink
fix build with clang<16
Browse files Browse the repository at this point in the history
  • Loading branch information
ottojo committed Feb 5, 2024
1 parent 5da3506 commit 544fce2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void NodeTree::addNode(const std::shared_ptr<TreeNode> &curNode, const std::stri

auto prefixEnd = name.find('/');
if (prefixEnd == std::string::npos) {
curNode->children.emplace_back(std::make_shared<TreeNode>(name, fullName));
curNode->children.emplace_back(std::make_shared<TreeNode>(TreeNode{name, fullName}));
return;
}

Expand All @@ -127,7 +127,7 @@ void NodeTree::addNode(const std::shared_ptr<TreeNode> &curNode, const std::stri
}

if (nextNode == nullptr) {
nextNode = std::make_shared<TreeNode>(name, fullName);
nextNode = std::make_shared<TreeNode>(TreeNode{name, fullName});
curNode->children.emplace_back(nextNode);
} else {
// found an existing node, check whether we have to subdivide it
Expand All @@ -137,7 +137,7 @@ void NodeTree::addNode(const std::shared_ptr<TreeNode> &curNode, const std::stri
auto nextNodePrefix = nextNode->name.substr(0, idx);
auto nextNodeRemainingName = nextNode->name.substr(idx + 1);

nextNode->children.emplace_back(std::make_shared<TreeNode>(nextNodeRemainingName, nextNode->fullName));
nextNode->children.emplace_back(std::make_shared<TreeNode>(TreeNode{nextNodeRemainingName, nextNode->fullName}));

nextNode->name = nextNodePrefix;
nextNode->fullName.clear();
Expand Down

0 comments on commit 544fce2

Please sign in to comment.