MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / strToFloat

Method strToFloat

src/components/ThemeComponent.cpp:379–389  ·  view source on GitHub ↗

converts a string to a float

Source from the content-addressed store, hash-verified

377
378//converts a string to a float
379float ThemeComponent::strToFloat(std::string str, float defaultVal)
380{
381 if(str.empty())
382 return defaultVal;
383
384 float ret;
385 std::stringstream ss;
386 ss << str;
387 ss >> ret;
388 return ret;
389}
390
391std::shared_ptr<Font> ThemeComponent::resolveFont(pugi::xml_node node, std::string defaultPath, unsigned int defaultSize)
392{

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected