MCPcopy Create free account
hub / github.com/amsynth/amsynth / valueFromString

Method valueFromString

src/core/synth/Parameter.cpp:144–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144float
145Parameter::valueFromString(const std::string &str)
146{
147 // atof() and friends are affected by currently configured locale,
148 // which can change the decimal point character.
149 std::istringstream istr(str);
150 istr.imbue(std::locale::classic());
151 float value = m::nan;
152 istr >> value;
153 return value;
154}
155
156const std::string
157Parameter::getStringValue() const

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected