Philipp Thomas wrote:
* Per Jessen (per@computer.org) [20090813 18:23]:
btOptimizedBvhNode is a struct so you can't initialize where it is defined, only when it is instantiated.
Yes, because a struct doesn't have ctors you can't initialize it where defined, I know that. What I had in mind was initializing with memset(xxx,'\0', sizeof(xxx)).
Yeah, or just "struct btOptimizedBvhNode tmp = {0}", but I'm sure you see the problem - it has to be done wherever the thing is declared, and that's too much work.
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).
After thinking a bit about it, I guess you are right. And calling it hack wasn't right either, it was just that no other suitable term came to my mind.
I don't know what else to do to achieve the alignment the author wanted. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org