Skip to content

Commit

Permalink
Minor update in GNEHierarchicalStructure. Refs #16039
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Jan 22, 2025
1 parent a19dfe0 commit e54cbe3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/netedit/elements/GNEHierarchicalStructure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,8 @@ GNEHierarchicalStructure::setChildren(const std::vector<GNEAdditional*>& newChil


template<> void
GNEHierarchicalStructure::setChildren(const std::vector<GNETAZSourceSink*>& newChildren) {
myChildSourceSinks.clear();
for (const auto &newChild : newChildren) {
myChildSourceSinks.insert(newChild);
}
GNEHierarchicalStructure::setChildrenHash(const std::unordered_set<GNETAZSourceSink*>& newChildren) {
myChildSourceSinks = newChildren;
}


Expand Down
6 changes: 5 additions & 1 deletion src/netedit/elements/GNEHierarchicalStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,18 @@ class GNEHierarchicalStructure {
template<typename T>
const GNEHierarchicalContainerChildren<T>& getChildren() const;

/// @brief get childrenHash
/// @brief get children hash
template<typename T>
const GNEHierarchicalContainerChildrenHash<T>& getChildrenHash() const;

/// @brief set children
template<typename T>
void setChildren(const std::vector<T>& newChildren);

/// @brief set children hash
template<typename T>
void setChildrenHash(const std::unordered_set<T>& newChildren);

private:
/// @brief parents junctions
GNEHierarchicalContainerParents<GNEJunction*> myParentJunctions;
Expand Down

0 comments on commit e54cbe3

Please sign in to comment.