Skip to content

Commit

Permalink
Revert "Extend minetest.is_yes()"
Browse files Browse the repository at this point in the history
This reverts commit c435eab.
  • Loading branch information
sfan5 committed Jan 7, 2017
1 parent c435eab commit ce106a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/unittest/test_utilities.cpp
Expand Up @@ -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);
}


Expand Down
2 changes: 1 addition & 1 deletion src/util/string.h
Expand Up @@ -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;
}


Expand Down

0 comments on commit ce106a4

Please sign in to comment.