(In reply to comment #170) > (In reply to comment #166) > > >+#define PAD(size, align) (((size) + (align) - 1) & (~((align) - 1))) > > > > I usually prefer functions over macros for the additional type safety and to > > avoid evaluating arguments twice (e.g. PAD(x, a++)) > > My experience has been that the compiler does a good job of optimizing out > that > duplication of effort, and the lack of overhead of the additional function > call > usually makes up for it, but in the specific case we're referring to, it > doesn't matter enough to worry about, and using a function call is more > consistent with the way it worked before. Re-submitted as attachment 522583
I was referring to the fact that PAD(x, a++) does a++ twice which is not what the caller is likely to expect. Regardless, I like the new version better. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/612377 Title: [needs-packaging] libjpeg-turbo -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs