Hi all,

Quick C++ style question.

A common pattern in Gecko is for method definitions to have a comment with the
'static' or 'virtual' qualification.

Before the reformat, the comment would be on it's own separate line [1]. Now
it's on the main line of the definition [2].

For example:

/* static */ void
Foo::Bar() {
  ...
}

vs.

/* static */ void Foo::Bar() {
  ...
}

Personally I think this now takes too much horizontal space from the main
definition, and would prefer it to be either on its own line or just removed.

Does anyone have an opinion on whether we still want these comments? And if so
whether it makes sense to move them back to their own line.

(My ulterior motive is that sublime text's indexer started failing to find
 these definitions after the reformat, but that should be fixed regardless)

If you're interested in what removing these would entail, I wrote a regex to
make the change [3].

Thanks,
Ryan

[1] 
https://hg.mozilla.org/mozilla-central/file/0348d472115d/layout/generic/nsFrame.cpp#l1759
[2] 
https://hg.mozilla.org/mozilla-central/file/e4b9b1084292/layout/generic/nsFrame.cpp#l1756
[3] https://hg.mozilla.org/try/rev/31ab3e466b6f15dcdbb1aee47edabc7c358b86f2

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to