Update ViewProviderFemMesh.cpp

fix warning: variable 'j'and 'i' is not initialized
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Update ViewProviderFemMesh.cpp
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
Andrea
2024-08-20 18:22:40 +02:00
committed by Chris Hennes
parent 9c92f93452
commit 4957477f67

View File

@@ -116,12 +116,12 @@ Base::Vector3d FemFace::set(short size,
hide = false;
// sorting the nodes for later easier comparison (bubble sort)
int i, j, flag = 1; // set flag to 1 to start first pass
int flag = 1; // set flag to 1 to start first pass
const SMDS_MeshNode* temp; // holding variable
for (i = 1; (i <= size) && flag; i++) {
for (int i = 1; (i <= size) && flag; i++) {
flag = 0;
for (j = 0; j < (size - 1); j++) {
for (int j = 0; j < (size - 1); j++) {
if (Nodes[j + 1] > Nodes[j]) // ascending order simply changes to <
{
temp = Nodes[j]; // swap elements
@@ -659,7 +659,7 @@ void ViewProviderFemMesh::applyDisplacementToNodes(double factor)
return;
}
float x, y, z;
float x = 0, y = 0, z = 0;
// set the point coordinates
long sz = pcCoords->point.getNum();
SbVec3f* verts = pcCoords->point.startEditing();