Skeleton tests for BBT_Time.
[ardour.git] / libs / ardour / utils.cc
index c8e6b1145f023e95c93eb0abf1683b12b919d90f..f7a4e1431604a68797c9872602811a44fbfbe3b7 100644 (file)
@@ -210,7 +210,7 @@ path_is_paired (ustring path, ustring& pair_base)
                path = path.substr(pos+1);
        }
 
-       /* remove filename suffixes etc. */
+       /* remove filename suffixes etc. */
 
        if ((pos = path.find_last_of ('.')) != string::npos) {
                path = path.substr (0, pos);
@@ -425,7 +425,7 @@ meter_falloff_from_float (float val)
        }
        else if (val <= METER_FALLOFF_FASTER) {
                return MeterFalloffFaster;
-       }
+       }
        else {
                return MeterFalloffFastest;
        }
@@ -517,16 +517,7 @@ string_is_affirmative (const std::string& str)
 {
        /* to be used only with XML data - not intended to handle user input */
 
-       if (str == "1" || str == "y" || str == "Y") {
-               return true;
-       } else {
-               std::string str_uc;
-               std::transform(str.begin(), str.end(), str_uc.begin(), ::toupper);
-               if (str_uc == "YES") {
-                       return true;
-               }
-       }
-       return false;
+       return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length()));
 }
 
 extern "C" {