summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2016-08-31 15:38:55 +1000
committerTim Mayberry <mojofunk@gmail.com>2017-04-19 09:36:59 +1000
commitac8b5192cd69f135efbd039c198529a8f3db7ef7 (patch)
tree1bf6f7928e6669d38d12761a1131c82297612e61 /libs/pbd
parent71fc5b9e8bb68eaea10cc7a6edbf02b6b7275211 (diff)
Remove now unused PBD::string_is_affirmative function
The equivalent function is now PBD::string_to<bool>
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/convert.cc20
-rw-r--r--libs/pbd/pbd/convert.h2
2 files changed, 0 insertions, 22 deletions
diff --git a/libs/pbd/convert.cc b/libs/pbd/convert.cc
index dd43475e69..c9af727504 100644
--- a/libs/pbd/convert.cc
+++ b/libs/pbd/convert.cc
@@ -278,26 +278,6 @@ strings_equal_ignore_case (const string& a, const string& b)
return false;
}
-bool
-string_is_affirmative (const std::string& str)
-{
- /* to be used only with XML data - not intended to handle user input */
-
- if (str.empty ()) {
- return false;
- }
-
- /* the use of g_ascii_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_ascii_strncasecmp(str.c_str(), "yes", str.length())) ||
- (!g_ascii_strncasecmp(str.c_str(), "true", str.length()));
-}
-
/** A wrapper for dgettext that takes a msgid of the form Context|Text.
* If Context|Text is translated, the translation is returned, otherwise
* just Text is returned. Useful for getting translations of words or phrases
diff --git a/libs/pbd/pbd/convert.h b/libs/pbd/pbd/convert.h
index d638ab8c8d..af40446a81 100644
--- a/libs/pbd/pbd/convert.h
+++ b/libs/pbd/pbd/convert.h
@@ -57,8 +57,6 @@ to_string (T t, std::ios_base & (*f)(std::ios_base&))
return oss.str();
}
-LIBPBD_API bool string_is_affirmative (const std::string&);
-
LIBPBD_API const char* sgettext (const char *, const char *);
} //namespace PBD