From 90fb6749200aecc364c202449dfc74bf77fa5b5e Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Thu, 15 Sep 2022 00:20:23 +0200 Subject: [PATCH] doc: fix coding style bad indentation --- doc/contributing/source/coding-style.rst | 30 +++++++++++++----------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/doc/contributing/source/coding-style.rst b/doc/contributing/source/coding-style.rst index de41eea9c..208eef2c8 100644 --- a/doc/contributing/source/coding-style.rst +++ b/doc/contributing/source/coding-style.rst @@ -529,22 +529,24 @@ Miscellaneous items pkt->RemoveHeader (header); ... -- As explained in this `issue `_, the ns-3 smart pointer class ``Ptr`` should be used in boolean comparisons as follows: - +- As explained in this `issue `_, + the ns-3 smart pointer class ``Ptr`` should be used in boolean comparisons as follows: :: - for Ptr<> p, do not use: use instead: - ======================== =========================== - if (p != 0) {...} if (p) {...} - if (p != NULL) {...} - if (p != nullptr {...} + for Ptr<> p, do not use: use instead: + ======================== ================================= + if (p != 0) {...} if (p) {...} + if (p != NULL) {...} + if (p != nullptr {...} - if (p == 0) {...} if (!p) {...} - if (p == NULL) {...} - if (p == nullptr {...} + if (p == 0) {...} if (!p) {...} + if (p == NULL) {...} + if (p == nullptr {...} - NS_ASSERT... (p != 0, ...) NS_ASSERT... (p, ...) - NS_ABORT... (p != 0, ...) NS_ABORT... (p, ...) + NS_ASSERT... (p != 0, ...) NS_ASSERT... (p, ...) + NS_ABORT... (p != 0, ...) NS_ABORT... (p, ...) - NS_ASSERT... (p == 0, ...) NS_ASSERT... (!p, ...) - NS_ABORT... (p == 0, ...) NS_ABORT... (!p, ...) + NS_ASSERT... (p == 0, ...) NS_ASSERT... (!p, ...) + NS_ABORT... (p == 0, ...) NS_ABORT... (!p, ...) + + NS_TEST... (p, 0, ...) NS_TEST... (p, nullptr, ...)