From 32b3e448c5332a4effd015de56246a702ddea65e Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Tue, 28 Apr 2026 05:09:44 +0300
Subject: [PATCH 33/33] common/ headers: Replace NULL with nullptr

See RM #2006

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 common/name_translation.h | 10 +++++-----
 common/terrain.h          | 30 +++++++++++++++---------------
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/common/name_translation.h b/common/name_translation.h
index 9ccbc37c97..36d5810029 100644
--- a/common/name_translation.h
+++ b/common/name_translation.h
@@ -41,7 +41,7 @@ struct name_translation {
 };
 
 /* Initialization macro. */
-#define NAME_INIT { NULL, "\0", "\0" }
+#define NAME_INIT { nullptr, "\0", "\0" }
 
 /************************************************************************//**
   Initializes a name translation structure.
@@ -49,12 +49,12 @@ struct name_translation {
 static inline void name_init(struct name_translation *ptrans)
 {
   ptrans->vernacular[0] = ptrans->rulename[0] = '\0';
-  ptrans->translated = NULL;
+  ptrans->translated = nullptr;
 }
 
 /************************************************************************//**
   Set the untranslated and rule names of the name translation structure.
-  If rule_name is NULL, use vernacular_name for it (after removing any i18n
+  If rule_name is nullptr, use vernacular_name for it (after removing any i18n
   qualifier).
 ****************************************************************************/
 static inline void names_set(struct name_translation *ptrans,
@@ -71,7 +71,7 @@ static inline void names_set(struct name_translation *ptrans,
 
   if (ptrans->vernacular[0] != '\0') {
     /* Translate now. */
-    if (domain == NULL) {
+    if (domain == nullptr) {
       ptrans->translated = Q_(ptrans->vernacular);
     } else {
       ptrans->translated = skip_intl_qualifier_prefix(DG_(domain, ptrans->vernacular));
@@ -89,7 +89,7 @@ static inline void name_set(struct name_translation *ptrans,
                             const char *domain,
                             const char *vernacular_name)
 {
-  names_set(ptrans, domain, vernacular_name, NULL);
+  names_set(ptrans, domain, vernacular_name, nullptr);
 }
 
 /************************************************************************//**
diff --git a/common/terrain.h b/common/terrain.h
index 13129ff195..4dc67bfa1a 100644
--- a/common/terrain.h
+++ b/common/terrain.h
@@ -178,14 +178,14 @@ const char *terrain_name_translation(const struct terrain *pterrain);
 
 bool is_terrain_flag_card_near(const struct civ_map *nmap,
                                const struct tile *ptile,
-			       enum terrain_flag_id flag);
+                               enum terrain_flag_id flag);
 bool is_terrain_flag_near_tile(const struct civ_map *nmap,
                                const struct tile *ptile,
-			       enum terrain_flag_id flag);
+                               enum terrain_flag_id flag);
 int count_terrain_flag_near_tile(const struct civ_map *nmap,
                                  const struct tile *ptile,
-				 bool cardinal_only, bool percentage,
-				 enum terrain_flag_id flag);
+                                 bool cardinal_only, bool percentage,
+                                 enum terrain_flag_id flag);
 void user_terrain_flags_init(void);
 void user_terrain_flags_free(void);
 void set_user_terrain_flag_name(enum terrain_flag_id id, const char *name, const char *helptxt);
@@ -203,11 +203,11 @@ bool terrain_has_resource(const struct terrain *pterrain,
 /* Functions to operate on a general terrain type. */
 bool is_terrain_card_near(const struct civ_map *nmap,
                           const struct tile *ptile,
-			  const struct terrain *pterrain,
+                          const struct terrain *pterrain,
                           bool check_self);
 bool is_terrain_near_tile(const struct civ_map *nmap,
                           const struct tile *ptile,
-			  const struct terrain *pterrain,
+                          const struct terrain *pterrain,
                           bool check_self);
 int count_terrain_property_near_tile(const struct civ_map *nmap,
                                      const struct tile *ptile,
@@ -296,16 +296,16 @@ const struct terrain *terrain_array_last(void);
     }                                                                     \
   }
 
-#define terrain_animals_iterate(pterrain, _animal)                  \
-  if (NULL != pterrain && pterrain->num_animals > 0) {                  \
-    int _animal##_index;                                                     \
-    for (_animal##_index = 0;                                                \
-         _animal##_index < pterrain->num_animals;                       \
-         _animal##_index++) {                                                \
-      const struct unit_type *_animal = pterrain->animals[_animal##_index];        \
+#define terrain_animals_iterate(pterrain, _animal)                          \
+  if (pterrain != nullptr && pterrain->num_animals > 0) {                   \
+    int _animal##_index;                                                    \
+    for (_animal##_index = 0;                                               \
+         _animal##_index < pterrain->num_animals;                           \
+         _animal##_index++) {                                               \
+      const struct unit_type *_animal = pterrain->animals[_animal##_index];
 
-#define terrain_animals_iterate_end                                     \
-    }                                                                     \
+#define terrain_animals_iterate_end                                         \
+    }                                                                       \
   }
 
 #ifdef __cplusplus
-- 
2.53.0

