From cef30619d0d7296e1730d87dae1c9712ac5cd822 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 6 Jan 2020 19:00:20 -0800 Subject: code cleanup: introduce empty_cylinder constant This deals with the issue of initializing structs in C++. Signed-off-by: Dirk Hohndel --- core/equipment.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/equipment.h') diff --git a/core/equipment.h b/core/equipment.h index 11d6f37c1..b62587447 100644 --- a/core/equipment.h +++ b/core/equipment.h @@ -33,6 +33,8 @@ typedef struct bool bestmix_he; } cylinder_t; +static const cylinder_t empty_cylinder = { { { 0 }, { 0 }, (const char *)0}, { { 0 }, { 0 } } , { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, false, { 0 }, { 0 }, OC_GAS, false, false }; + /* Table of cylinders. Attention: this stores cylinders, * *not* pointers to cylinders. This has two crucial consequences: * 1) Pointers to cylinders are not stable. They may be -- cgit v1.2.3-70-g09d2