From 90970369deff4ec34253bb0aabdbe74c6a6f6cbe Mon Sep 17 00:00:00 2001 From: ThePixelCoder Date: Tue, 14 Sep 2021 01:03:11 -0500 Subject: [PATCH] Make class ordering more clear --- Contributing.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Contributing.md b/Contributing.md index 24b4245f..16c589b8 100644 --- a/Contributing.md +++ b/Contributing.md @@ -82,11 +82,12 @@ This will allow your contributions to be reviewed more quickly. * `sStaticVariable` if it's a static member variable ### Classes - -* Put access specifiers in this order: `public`, `protected`, `private`. -* Declare member functions in this order: constructor, destructor, operators, other member functions. - * Virtual functions need to match the original order in the executable, though, so ignore this rule if following it would require reordering virtual functions. -* Declare static member variables before non-static variables. +* Ordering + * Put access specifiers in this order: `public`, `protected`, `private`. + * Declare member functions in this order: constructor, destructor, operators, other member functions. + * Declare non-static member variables after function declarations. + * Declare static member variables before non-static variables. + * Virtual functions need to match the original order in the executable, though, so ignore this rule if following it would require reordering virtual functions. * If a class uses a macro like `SEAD_SINGLETON_DISPOSER` or one of the SEAD_RTTI macros, put the macro right after the opening brace, before `public:`. * Use `= default;` instead of constructors/destructors with an empty body. * Use the `override` keyword instead of `virtual` when overriding virtual functions from a parent class.