Skip to content

Commit be3ef2e

Browse files
authored
Merge pull request opensim-org#3510 from opensim-org/fix_initialization-order-error
Fix init order error found by libASAN's check_initialization_order
2 parents e6a1b25 + f201e74 commit be3ef2e

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

OpenSim/Simulation/Wrap/WrapCylinderObst.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ static const char* wrapTypeName = "cylinderObst";
3535
static const double TwoPi = 2.0*SimTK::Pi;
3636
static const double max_wrap_pts_circle_ang = (5.0/360.0)*TwoPi;
3737

38-
// The following variables could be used for speedy wrap_pts definitions (NOT CURRENTLY USED)
39-
static const int num_circle_wrap_pts = 36; // Number of circle points in 360 degrees
40-
static double circle_wrap_pts_sin[num_circle_wrap_pts];
41-
static double circle_wrap_pts_cos[num_circle_wrap_pts];
42-
static bool circle_wrap_pts_inited = false;
43-
4438
//=============================================================================
4539
// CONSTRUCTOR(S) AND DESTRUCTOR
4640
//=============================================================================
@@ -68,12 +62,7 @@ WrapCylinderObst::~WrapCylinderObst()
6862
//_____________________________________________________________________________
6963
/** Initialize static data variables used for speedy definition of wrap_pts (for graphics mainly) */
7064
void WrapCylinderObst::initCircleWrapPts()
71-
{ int i; double q;
72-
for(i=0; i<num_circle_wrap_pts; i++) {
73-
q = TwoPi*(double)(i)/(double)(num_circle_wrap_pts);
74-
circle_wrap_pts_sin[i] = sin(q);
75-
circle_wrap_pts_cos[i] = cos(q);
76-
} circle_wrap_pts_inited = true;
65+
{
7766
}
7867

7968
//_____________________________________________________________________________

0 commit comments

Comments
 (0)