Use PBD string conversion functions in PBD::ConfigurationVariable

No longer need a specialization for bool as PBD::to_string/string_to already
has specializations for bool

Remove template specialization for float as string_to/to_string handles string
representations of infinity
This commit is contained in:
Tim Mayberry 2016-08-24 22:32:51 +10:00
parent cb3c564822
commit 2b58bbd50a
6 changed files with 8 additions and 63 deletions

View file

@ -111,11 +111,3 @@ ConfigVariableBase::miss ()
// placeholder for any debugging desired when a config variable
// is set but to the same value as it already has
}
/* Specialisation of ConfigVariable to deal with float (-inf etc)
* http://stackoverflow.com/questions/23374095/should-a-stringstream-parse-infinity-as-an-infinite-value
*/
template<> void
ConfigVariable<float>::set_from_string (std::string const & s) {
value = std::strtof (s.c_str(), NULL);
}