On Thu, Dec 10, 2009 at 2:24 PM, Peter Kasting <pkast...@google.com> wrote:
> On Thu, Dec 10, 2009 at 11:20 AM, Jacob Mandelson <ja...@mandelson.org> > wrote: > >> If something extra in an expression is a common case, I've sometimes >> seen it done like: >> return DoWork(&foo) POSIX_ONLY(&& DoWork(&posix_specific)); >> where POSIX_ONLY will expand to nothing or its argument. >> It's ugly, but compact. > > > The Google C++ Style Guide says to avoid macros when there is a non-macro > way to do the same thing. > Sanity says that too. Scott's technique is the best. If you can't figure out what's happening by glancing at the code, it's not code, it's assembly. M-A (grr) -- Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev