From 6d9ecbcfb71d65bfe5b88449a0e8cbffb26e45de Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 2 Mar 2019 23:21:25 +0000 Subject: [PATCH] Marginally less sucky version of a function that completely sucks git-svn-id: https://svn.eduke32.com/eduke32@7367 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/config.cpp | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/source/duke3d/src/config.cpp b/source/duke3d/src/config.cpp index fbc255e18..197d74e71 100644 --- a/source/duke3d/src/config.cpp +++ b/source/duke3d/src/config.cpp @@ -65,25 +65,16 @@ int32_t CONFIG_AnalogNameToNum(const char *func) { if (!func) return -1; - - if (!Bstrcasecmp(func,"analog_turning")) - { + else if (!Bstrcasecmp(func, "analog_turning")) return analog_turning; - } - if (!Bstrcasecmp(func,"analog_strafing")) - { + else if (!Bstrcasecmp(func, "analog_strafing")) return analog_strafing; - } - if (!Bstrcasecmp(func,"analog_moving")) - { + else if (!Bstrcasecmp(func, "analog_moving")) return analog_moving; - } - if (!Bstrcasecmp(func,"analog_lookingupanddown")) - { + else if (!Bstrcasecmp(func, "analog_lookingupanddown")) return analog_lookingupanddown; - } - - return -1; + else + return -1; }