- Documentation of containers, core, and format
This commit is contained in:
@@ -36,16 +36,16 @@ namespace fennec
|
||||
|
||||
scene_node* scene::operator[](const cstring& name) const {
|
||||
list<size_t> parse;
|
||||
parse.push_back(root);
|
||||
parse.push_back(table_t::root);
|
||||
while (not parse.empty()) {
|
||||
size_t n = parse.front();
|
||||
if (_table[n].value->name == name) {
|
||||
return _table[n].value;
|
||||
if (_table[n]->name == name) {
|
||||
return _table[n].get();
|
||||
}
|
||||
|
||||
// Pre-Order traversal
|
||||
parse.push_front(next(n));
|
||||
parse.push_front(child(n));
|
||||
parse.push_front(_table.next(n));
|
||||
parse.push_front(_table.child(n));
|
||||
parse.pop_front();
|
||||
}
|
||||
return nullptr;
|
||||
@@ -53,16 +53,16 @@ scene_node* scene::operator[](const cstring& name) const {
|
||||
|
||||
scene_node* scene::operator[](const string& name) const {
|
||||
list<size_t> parse;
|
||||
parse.push_back(root);
|
||||
parse.push_back(table_t::root);
|
||||
while (not parse.empty()) {
|
||||
size_t n = parse.front();
|
||||
if (_table[n].value->name == name) {
|
||||
return _table[n].value;
|
||||
if (_table[n]->name == name) {
|
||||
return _table[n].get();
|
||||
}
|
||||
|
||||
// Pre-Order traversal
|
||||
parse.push_front(next(n));
|
||||
parse.push_front(child(n));
|
||||
parse.push_front(_table.next(n));
|
||||
parse.push_front(_table.child(n));
|
||||
parse.pop_front();
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user