Skip to content

Commit 93460ce

Browse files
committed
Try (again) to avoid uninitialized value error on GCC (pt 2)
1 parent 0a3b067 commit 93460ce

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

OpenSim/Simulation/Wrap/WrapResult.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,10 @@ void WrapResult::copyData(const WrapResult& aWrapResult) {
4949
startPoint = aWrapResult.startPoint;
5050
endPoint = aWrapResult.endPoint;
5151

52-
// Avoid uninitialized warnings on GCC 12+
53-
r1 = SimTK::Vec3(0.0);
54-
r2 = SimTK::Vec3(0.0);
55-
c1 = SimTK::Vec3(0.0);
56-
sv = SimTK::Vec3(0.0);
57-
58-
int i;
59-
for (i = 0; i < 3; i++) {
60-
r1[i] = aWrapResult.r1[i];
61-
r2[i] = aWrapResult.r2[i];
62-
c1[i] = aWrapResult.c1[i];
63-
sv[i] = aWrapResult.sv[i];
64-
}
52+
r1 = aWrapResult.r1;
53+
r2 = aWrapResult.r2;
54+
c1 = aWrapResult.c1;
55+
sv = aWrapResult.sv;
6556

6657
singleWrap = aWrapResult.singleWrap;
6758
// TODO: Should factor be omitted from the copy?

0 commit comments

Comments
 (0)