Make an empty-string non-affirmative so that AxisView::set_marked_for_display works properly when the visible gui property does not exist.

git-svn-id: svn://localhost/ardour2/branches/3.0@9833 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-07-10 21:50:00 +00:00
parent 216ad7fe90
commit a7057d6965

View file

@ -561,6 +561,10 @@ string_is_affirmative (const std::string& str)
{ {
/* to be used only with XML data - not intended to handle user input */ /* to be used only with XML data - not intended to handle user input */
if (str.empty ()) {
return false;
}
return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length())); return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length()));
} }