peak of refactor
This commit is contained in:
parent
e5fb9a9a23
commit
96b177858e
@ -50,7 +50,7 @@ void UiDocument::collect(uinodes_map& map, std::shared_ptr<gui::UINode> node) {
|
|||||||
if (!id.empty()) {
|
if (!id.empty()) {
|
||||||
map[id] = node;
|
map[id] = node;
|
||||||
}
|
}
|
||||||
auto container = dynamic_cast<gui::Container*>(node.get());
|
auto container = std::dynamic_pointer_cast<gui::Container>(node);
|
||||||
if (container) {
|
if (container) {
|
||||||
for (auto subnode : container->getNodes()) {
|
for (auto subnode : container->getNodes()) {
|
||||||
collect(map, subnode);
|
collect(map, subnode);
|
||||||
@ -83,4 +83,4 @@ std::unique_ptr<UiDocument> UiDocument::read(int penv, std::string namesp, fs::p
|
|||||||
std::shared_ptr<gui::UINode> UiDocument::readElement(fs::path file) {
|
std::shared_ptr<gui::UINode> UiDocument::readElement(fs::path file) {
|
||||||
auto document = read(-1, file.filename().u8string(), file);
|
auto document = read(-1, file.filename().u8string(), file);
|
||||||
return document->getRoot();
|
return document->getRoot();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user