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);