From a990384b70f1c639d495ff54023dfffc14a2e2f7 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 12 May 2023 17:06:17 +0300 Subject: [PATCH 21/21] CodingStyle: Allow C23 nullptr See osdn #48034 Signed-off-by: Marko Lindqvist --- doc/CodingStyle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/CodingStyle b/doc/CodingStyle index de974a0796..2b0029aeba 100644 --- a/doc/CodingStyle +++ b/doc/CodingStyle @@ -631,8 +631,9 @@ functions available natively. in header files. It also means casts on void pointers (which should be avoided in C files) must be used in headers. -- To assign null pointer, or to compare against one, use 'NULL' in C code, - and 'nullptr' in C++ code. +- To assign null pointer, or to compare against one, use 'nullptr' in C++ code + In C code that's going to get backported to freeciv-3.2 or even older, + 'NULL' must be used. In freeciv-3.3, and later, 'nullptr' can be used. - If you send patches, use "diff -u" (or "diff -r -u"). "git diff" works correctly without extra parameters. -- 2.39.2