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 /load-git.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 'load-git.c')
-rw-r--r-- | load-git.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/load-git.c b/load-git.c index 54d349bd0..459d8d117 100644 --- a/load-git.c +++ b/load-git.c @@ -264,12 +264,8 @@ static void parse_cylinder_keyvalue(void *_cylinder, const char *key, const char return; } if (!strcmp(key, "use")) { - for (enum cylinderuse i = 0; i < NUM_GAS_USE; i++) { - if (same_string(value, cylinderuse_text[i])) { - cylinder->cylinder_use = i; - return; - } - } + cylinder->cylinder_use = cylinderuse_from_text(value); + return; } report_error("Unknown cylinder key/value pair (%s/%s)", key, value); } |