(Note: Use a monospace font to view this message or use
<https://gist.github.com/anonymous/5695db5c115f07ac5118>.)

The placement of the line-continuation backslash in macros is wildly
inconsistent. Some put the backslash directly after the line:

#define NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(_class) \
  NS_IMETHODIMP_(bool) \
  NS_CYCLE_COLLECTION_CLASSNAME(_class)::CanSkipInCCReal(void *p) \
  { \
    _class *tmp = DowncastCCParticipant<_class >(p);


Others align the backslashes with that of the longest line:

#define NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(_class)     \
  NS_IMETHODIMP_(bool)                                            \
  NS_CYCLE_COLLECTION_CLASSNAME(_class)::CanSkipInCCReal(void *p) \
  {                                                               \
    _class *tmp = DowncastCCParticipant<_class >(p);


And the rest put the backslashes at the 80th column:

#define NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(_class)                  \
  NS_IMETHODIMP_(bool)                                                         \
  NS_CYCLE_COLLECTION_CLASSNAME(_class)::CanSkipInCCReal(void *p)              \
  {                                                                            \
    _class *tmp = DowncastCCParticipant<_class >(p);


Of these options, I personally dislike the second style as it will
result in unnecessary churn whenever the longest line changes. Is
there a preferred style?
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to