I've seen both styles used, although I think that int Foo();
is the most common style when declaring a function prototype in a class header. Generally speaking its more important to be consistent with the rest of the file. Dave Hylands ----- Original Message ----- > From: "Birunthan Mohanathas" <[email protected]> > To: "dev-platform" <[email protected]> > Sent: Sunday, May 18, 2014 4:27:07 AM > Subject: Gecko style: Formatting function return type and specifiers > For top-level function definitions, the recommended style is: > template<typename T> > static inline T > Foo() > { > // ... > } > However, for function declarations and inline member functions, there > does not seem to be a definitive style. Some use: > int Foo(); > class Bar > { > virtual int Baz() > { > // ... > } > }; > ... and others use: > int > Foo(); > class Bar > { > virtual int > Baz() > { > // ... > } > }; > Which one should be preferred? > _______________________________________________ > dev-platform mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-platform _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

