mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
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:
parent
cb3c564822
commit
2b58bbd50a
6 changed files with 8 additions and 63 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue