Skip to content

Commit

Permalink
dev: correct style guide on leading-underscores-on-private-members
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jul 30, 2024
1 parent 4dbd7bb commit 05b438c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dev/source/docs/style-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ Names
Private members
---------------

Private members in classes should be prefixed with an underscore:
Private members in classes may be prefixed with an underscore:

**Right:**

Expand All @@ -329,7 +329,7 @@ Private members in classes should be prefixed with an underscore:
int _field;
};

**Wrong:**
**Right:**

::

Expand All @@ -338,6 +338,8 @@ Private members in classes should be prefixed with an underscore:
int field;
};

The ArduPilot codebase contains a mixture of the two styles. Either is acceptable, with a preference for no-leading-underscores in new code.

Class names
-----------

Expand Down

0 comments on commit 05b438c

Please sign in to comment.