mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Update coding rules
This commit is contained in:
parent
bdd7e26b3e
commit
21fa3f3f94
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user