From 7c47d8af081a951da53f29b303a792af87e40bc1 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Thu, 2 Jun 2022 20:22:53 +0100 Subject: [PATCH] doc: Fix indentation on coding-style.rst --- doc/contributing/source/coding-style.rst | 56 ++++++++++++------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/doc/contributing/source/coding-style.rst b/doc/contributing/source/coding-style.rst index ab2fe7b99..13cff3185 100644 --- a/doc/contributing/source/coding-style.rst +++ b/doc/contributing/source/coding-style.rst @@ -40,7 +40,7 @@ suggested: $ /path/to/utils/check-style.py -i -l 3 -f new-file.cc -The ``-i`` flag tells check-style.py to make modifications in-place. The +The ``-i`` flag tells ``check-style.py`` to make modifications in-place. The ``-l 3`` argument asks to apply the highest level of whitespace compliance changes to the code. @@ -89,32 +89,32 @@ extends it to C++. Do not use tabs for indentation. Indentation spacing is :: - Foo (void) - { - if (test) - { - // do stuff here - } - else - { - // do other stuff here - } - - for (int i = 0; i < 100; i++) - { - // do loop - } - - while (test) - { - // do while - } - - do - { - // do stuff - } while (); - } + Foo (void) + { + if (test) + { + // do stuff here + } + else + { + // do other stuff here + } + + for (int i = 0; i < 100; i++) + { + // do loop + } + + while (test) + { + // do while + } + + do + { + // do stuff + } while (); + } Each statement should be put on a separate line to increase readability, and multi-statement blocks following conditional or looping statements are always @@ -497,7 +497,7 @@ Miscellaneous items :: void TcpSocketBase::CompleteFork (Ptr p [[maybe_unused]], const TcpHeader& h, - const Address& fromAddress, const Address& toAddress) + const Address& fromAddress, const Address& toAddress) { NS_LOG_FUNCTION (this << p << h << fromAddress << toAddress); ...