diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-11-17 13:52:22 +0000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-17 13:52:22 +0000 |
commit | 1739042f3431e5b399db0cf49106c98478436a2f (patch) | |
tree | 7dcbeb92d3f8b1f60238ade51653b1cbb770d172 /parse-xml.c | |
parent | 74582de06ccdd5bcec1aa7ed9f77854a765da4e0 (diff) | |
download | subsurface-1739042f3431e5b399db0cf49106c98478436a2f.tar.gz |
Use cylinder use helper function
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/parse-xml.c b/parse-xml.c index 24911b0b6..79fd49661 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -338,14 +338,8 @@ static void pressure(char *buffer, pressure_t *pressure) static void cylinder_use(char *buffer, enum cylinderuse *cyl_use) { - if (trimspace(buffer)) { - for (enum cylinderuse i = 0; i < NUM_GAS_USE; i++) { - if (same_string(buffer, cylinderuse_text[i])) { - *cyl_use = i; - return; - } - } - } + if (trimspace(buffer)) + *cyl_use = cylinderuse_from_text(buffer); } static void salinity(char *buffer, int *salinity) |