summaryrefslogtreecommitdiffstats
path: root/core/gas-model.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-06-04 09:06:13 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-06-19 13:11:10 -0700
commitce065968f0b14b7c4baa41df67bae7cd7e5e7829 (patch)
treef852fc3b8fc81a277d29cc707ca7454575afda61 /core/gas-model.c
parentbff80cf4625c4a97182e8333633403d06725a613 (diff)
downloadsubsurface-ce065968f0b14b7c4baa41df67bae7cd7e5e7829.tar.gz
Cleanup: remove bogus inline modifier
gas_density() was declared extern in the header and defined inline in the translation unit. I didn't even realize that this oxymoron is valid. Remove inline and an Java-style function definition. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/gas-model.c')
-rw-r--r--core/gas-model.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/gas-model.c b/core/gas-model.c
index 7fb9ce111..79dbd2ded 100644
--- a/core/gas-model.c
+++ b/core/gas-model.c
@@ -76,7 +76,8 @@ double isothermal_pressure(struct gasmix gas, double p1, int volume1, int volume
return p_ideal * gas_compressibility_factor(gas, p_ideal);
}
-inline double gas_density(struct gasmix gas, int pressure) {
+double gas_density(struct gasmix gas, int pressure)
+{
int density = gas.he.permille * HE_DENSITY + gas.o2.permille * O2_DENSITY + (1000 - gas.he.permille - gas.o2.permille) * N2_DENSITY;
return density * (double) pressure / gas_compressibility_factor(gas, pressure / 1000.0) / SURFACE_PRESSURE / 1000000.0;