Skip to content

Commit

Permalink
[style] Always add curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
yungyuc committed Aug 23, 2024
1 parent 194a313 commit effaaad
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions STYLE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,26 @@ hundreds of lines) to keep track of.
} /* end namespace modmesh */
C++ Curly Braces
====

Always add curly braces and always add them in standalone lines:

.. code-block:: cpp
if (condition)
{
return;
}
That is, never drop curly braces even when you can:

.. code-block:: cpp
// NEVER DROP CURLY BRACES
if (condition)
return;
Copyright Notice
====

Expand Down

0 comments on commit effaaad

Please sign in to comment.