diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-11 19:20:26 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-11 19:20:26 +0000 |
commit | 676542dcce03a1860fac8bb0638e5bb8ccb8ddce (patch) | |
tree | eee9e896aea1d5ea88a76d36427976da567bb4ea /libs | |
parent | 1d17d4375178719e8dcd5c4ab688a6b48168cc45 (diff) |
explanatory comment about use of g_strncasecmp()
git-svn-id: svn://localhost/ardour2/branches/3.0@9840 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/utils.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 4b7fdc2f91..3a5ea0084a 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -565,6 +565,13 @@ string_is_affirmative (const std::string& str) return false; } + /* the use of g_strncasecmp() is solely to get around issues with + * charsets posed by trying to use C++ for the same + * comparison. switching a std::string to its lower- or upper-case + * version has several issues, but handled by default + * in the way we desire when doing it in C. + */ + return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length())); } |