On 08/13/2009 06:22 PM, Per Jessen wrote:
Philipp Thomas wrote:
* Per Jessen (per@computer.org) [20090813 12:37]:
argument _Val. I'm guessing that _Val is of type btOptimizedBvhNode, the struct with m_padding[5]. To copy from _Val to the new object, m_padding will also be read, but since it hasn't been initialized ...
And? Where's the problem ? Simply initialize m_padding and the compiler will stop complaining. No need for the sizeof hack.
Philipp
btOptimizedBvhNode is a struct so you can't initialize where it is defined, only when it is instantiated. Making the padding anynomous is much easier (and there's no "hack" in using sizeof() to make sure I get the right number of bits).
/Per Jessen, Zürich
I spent quite a while trying to initialize it where it is defined and found it impossible (not that I know that much but it's good to learn these things ) to either transfer &m_data to another variable or even use it due to the reference operator & mostly giving an lvalue error and I don't quite understand it yet. From what I can understand m_padding is simply extra memory in case of overflow. Thanks very much for your help Per and Philip, the package builds on local osc and works on my machine but I still have quite a few spec file problems to sort out before it will build online meanwhile I will submit the patch to blender.org devs to see if any unforeseen dangers may have been created. Regards Dave P -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org