Optimizes memory usage even further by removing the list initialization in gas mixture new() in favor of having the lists start as empty lists. seems to save about 20mb of memory on box judging from one unscientific single test

This commit is contained in:
deathride58
2019-04-12 08:13:51 -04:00
parent 2078485594
commit b1467b4ec4
2 changed files with 8 additions and 4 deletions
+3
View File
@@ -240,8 +240,11 @@
//HELPERS
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
//REMOVE REMOVE REMOVE REMOVE
#define ADD_GAS(gas_id, out_list) out_list[gas_id] = 0
//REMOVEREMOVEREMOVE
#define ASSERT_GAS(gas_id, gas_mixture) if (!gas_mixture.gases[gas_id]) { ADD_GAS(gas_id, gas_mixture.gases) };