From ce106a4113de048718ab9f396db3d368c35218fc Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 7 Jan 2017 11:05:05 +0100 Subject: Revert "Extend minetest.is_yes()" This reverts commit c435eabf3ffb77eab955d5faeb5450da1befc149. --- src/unittest/test_utilities.cpp | 2 -- src/util/string.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/unittest/test_utilities.cpp b/src/unittest/test_utilities.cpp index 58412dd85..d73975b9f 100644 --- a/src/unittest/test_utilities.cpp +++ b/src/unittest/test_utilities.cpp @@ -147,8 +147,6 @@ void TestUtilities::testIsYes() UASSERT(is_yes("0") == false); UASSERT(is_yes("1") == true); UASSERT(is_yes("2") == true); - UASSERT(is_yes("on") == true); - UASSERT(is_yes("off") == false); } diff --git a/src/util/string.h b/src/util/string.h index ba3c09e51..572c37150 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -272,7 +272,7 @@ inline bool is_yes(const std::string &str) { std::string s2 = lowercase(trim(str)); - return s2 == "y" || s2 == "yes" || s2 == "true" || s2 == "on" || atoi(s2.c_str()) != 0; + return s2 == "y" || s2 == "yes" || s2 == "true" || atoi(s2.c_str()) != 0; } -- cgit v1.2.3