diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-01-06 19:00:20 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-10 02:37:03 +0900 |
commit | cef30619d0d7296e1730d87dae1c9712ac5cd822 (patch) | |
tree | 655e9c94f0272b38480b6fc6e5734388c5bc9408 /core/equipment.h | |
parent | 4e419f74456bc3ac04e8d8c7550153434e36f475 (diff) | |
download | subsurface-cef30619d0d7296e1730d87dae1c9712ac5cd822.tar.gz |
code cleanup: introduce empty_cylinder constant
This deals with the issue of initializing structs in C++.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/equipment.h')
-rw-r--r-- | core/equipment.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |