mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-28 09:27:39 +01:00
explanatory comment about use of g_strncasecmp()
git-svn-id: svn://localhost/ardour2/branches/3.0@9840 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1d17d43751
commit
676542dcce
1 changed files with 7 additions and 0 deletions
|
|
@ -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()));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue