diff --git a/src/FDM/YASim/Wing.cpp b/src/FDM/YASim/Wing.cpp index c5595636e..81aa4e3e9 100644 --- a/src/FDM/YASim/Wing.cpp +++ b/src/FDM/YASim/Wing.cpp @@ -187,7 +187,8 @@ void Wing::compile() // and the wing itself into an array, sort them, // and remove duplicates. This gives us the boundaries of our // segments. - float bounds[10]; + const int NUM_BOUNDS {10}; + float bounds[NUM_BOUNDS]; bounds[0] = _flap0Start; bounds[1] = _flap0End; bounds[2] = _flap1Start; bounds[3] = _flap1End; bounds[4] = _spoilerStart; bounds[5] = _spoilerEnd; @@ -197,11 +198,10 @@ void Wing::compile() // Sort in increasing order int i; - for(i=0; i<10; i++) { + for(i=0; i