-
Notifications
You must be signed in to change notification settings - Fork 7
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/gridedit 992 add api for inserting edges #319
Feature/gridedit 992 add api for inserting edges #319
Conversation
{ | ||
auto result = meshKernelState[meshKernelId].m_mesh2d->InsertNode(firstNodeCoordinates); | ||
firstNodeId = std::get<0>(result); |
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.
You may get a sonarcloud warning here to use structured binding.
Could use std::tie
{ | ||
auto result = meshKernelState[meshKernelId].m_mesh2d->InsertNode(secondNodeCoordinates); | ||
secondNodeId = std::get<0>(result); |
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.
here too
const auto newEdgeLength = ComputeDistance(firstNodeCoordinates, secondNodeCoordinates, meshKernelState[meshKernelId].m_projection); | ||
const auto edgeLengths = meshKernelState[meshKernelId].m_mesh2d->m_edgeLengths; | ||
const auto lengthFraction = 0.01; |
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.
Perhaps make edgeLengths a reference
Unless mesh->m_edgeLengths is modified later and you do not want t get these updates.
No description provided.