From 68b16f67415d5db4f7842286d34d5a468fab8b77 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 20 Jun 2024 17:58:14 +0100 Subject: [PATCH] Fix minor code style issue --- src/newgrf_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/newgrf_internal.h b/src/newgrf_internal.h index b4ada3532d..8e7a1a4b63 100644 --- a/src/newgrf_internal.h +++ b/src/newgrf_internal.h @@ -93,7 +93,7 @@ public: std::pair GetVarAction2ProcedureAnnotation(const SpriteGroup *group) { VarAction2ProcedureAnnotation *&ptr = this->procedure_annotations[group]; - if (!ptr) { + if (ptr == nullptr) { ptr = new (this->procedure_annotations_storage.Allocate()) VarAction2ProcedureAnnotation(); return std::make_pair(ptr, true); } else { @@ -105,7 +105,7 @@ public: { if (make_new) { std::vector *&ptr = this->inlinable_adjust_groups[group]; - if (!ptr) ptr = new (this->inlinable_adjust_groups_storage.Allocate()) std::vector(); + if (ptr == nullptr) ptr = new (this->inlinable_adjust_groups_storage.Allocate()) std::vector(); return ptr; } else { auto iter = this->inlinable_adjust_groups.find(group);