Make boolean string values 0 and 1 to maintain backwards compatibility

I would prefer "yes" and "no" as it distinguishes boolean values from numeric
but using "yes and "no" results in PBD::Property<T>::from_string failing to
parse the correct values when opening in an older Ardour version as there is no
specialization for bool.

Using 0 and 1 also results in less change to the Session file.
This commit is contained in:
Tim Mayberry
2017-04-18 13:10:58 +10:00
parent 362303f793
commit 13bfd1527a
2 changed files with 4 additions and 4 deletions

View File

@@ -564,8 +564,8 @@ StringConvertTest::test_double_conversion ()
}
// we have to use these as CPPUNIT_ASSERT_EQUAL won't accept char arrays
static const std::string BOOL_TRUE_STR ("yes");
static const std::string BOOL_FALSE_STR ("no");
static const std::string BOOL_TRUE_STR ("1");
static const std::string BOOL_FALSE_STR ("0");
void
StringConvertTest::test_bool_conversion ()