From 21fa3f3f9451c4be0e5882f08f0199ba451af8d6 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Mon, 15 Feb 2021 09:55:33 -0500 Subject: [PATCH] Update coding rules --- lib/doc/Development.lyx | 42 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/lib/doc/Development.lyx b/lib/doc/Development.lyx index 46f253ff11..ef61adb5cc 100644 --- a/lib/doc/Development.lyx +++ b/lib/doc/Development.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 601 +\lyxformat 606 \begin_document \begin_header \save_transient_properties true @@ -5897,6 +5897,46 @@ default: // not needed and would shadow a wrong use of Foo \end_inset +\end_layout + +\begin_layout Itemize +Use default initialization such as +\begin_inset listings +inline false +status open + +\begin_layout Plain Layout + +int i = 0; +\end_layout + +\begin_layout Plain Layout + +Class * ptr = nullptr; +\end_layout + +\end_inset + +rather than brace initialization: +\begin_inset listings +inline false +status open + +\begin_layout Plain Layout + +int i {}; +\end_layout + +\begin_layout Plain Layout + +Class * ptr {}; +\end_layout + +\end_inset + +for PODs. + Use brace initialization only for more complex data structures. + \end_layout \begin_layout Section