-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/correct mappings #13
Conversation
/// @brief Gets the double fill value | ||
/// @param[out] fillValue The double indicating the fill value | ||
/// @returns Error code | ||
UGRID_API int ug_get_double_fill_value(double& fillValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pass i by ref.
/// @brief Gets the int fill value | ||
/// @param[out] fillValue The int indicating the fill value | ||
/// @returns Error code | ||
UGRID_API int ug_get_int_fill_value(int& fillValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pass i by ref.
@@ -214,9 +213,13 @@ void Mesh2D::put(ugridapi::Mesh2D const& mesh2d) | |||
} | |||
|
|||
// Edges | |||
if (auto const it = m_topology_attribute_variables.find("edge_node_connectivity"); mesh2d.edge_node != nullptr && it != m_topology_attribute_variables.end()) | |||
if (auto const it = m_topology_attribute_variables.find("edge_node_connectivity"); mesh2d.edge_nodes != nullptr && it != m_topology_attribute_variables.end()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A general comments about put:
- Are all topology attributes mandatory? Are some optional? If the key of a mandatory attribute is not found in the map, a run time error should be thrown.
- Can't the if statements be replaced by a generic function?
tests/api/ApiTests.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use vectors instead of unique_ptrs.
No description provided.