]> git.mxchange.org Git - flightgear.git/commit
Fix for weather interpolation problem from Anders Gidenstam
authortimoore <timoore>
Wed, 15 Aug 2007 15:22:44 +0000 (15:22 +0000)
committertimoore <timoore>
Wed, 15 Aug 2007 15:22:44 +0000 (15:22 +0000)
commite23f731ef773c79fe4cbd1c994a1f12eff661259
tree4078b22432366beb9d4d5c8fa55ec08d25311283
parent3bf9ab10980e93a77a119441a0df81a46a5f2f04
Fix for weather interpolation problem from Anders Gidenstam
Anders said:
With Stuart's help I've looked closer at this and I think I've tracked
down the cause of the problem:
At least on my computer the sort() call on line 234 in
Environment/environment_ctrl.cxx sorts the vector entries by memory
address instead of altitude, i.e. the custom comparison predicate is not
used. This causes the tables of environment conditions to be reordered
into a wrong order at some weather updates, depending, basically,
on where the memory allocator places the objects. (Btw. why are they are
freshly allocated for each update?)
src/Environment/environment_ctrl.cxx
src/Environment/environment_ctrl.hxx