doc: Update coding-style.rst with unneeded typedef in struct and enum
This commit is contained in:
@@ -1151,6 +1151,22 @@ Miscellaneous items
|
||||
|
||||
- Do not add the ``enum`` or ``struct`` specifiers when declaring the variable's type.
|
||||
|
||||
- Do not unnecessarily add ``typedef`` to ``struct`` or ``enum``.
|
||||
|
||||
.. sourcecode:: cpp
|
||||
|
||||
// Avoid
|
||||
typedef struct
|
||||
{
|
||||
...
|
||||
} MyStruct;
|
||||
|
||||
// Prefer
|
||||
struct MyStruct
|
||||
{
|
||||
...
|
||||
};
|
||||
|
||||
Clang-tidy rules
|
||||
================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user