MCPcopy Create free account
hub / github.com/Norbyte/ositools / StringToReal

Function StringToReal

OsiInterface/Functions/UtilityFunctions.cpp:57–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57 bool StringToReal(OsiArgumentDesc & args)
58 {
59 auto a = args[0].String;
60 try {
61 args[1].Float = std::stof(a);
62 return true;
63 }
64 catch (std::invalid_argument &) {
65 return false;
66 }
67 }
68
69 // We need to keep the returned string alive
70 // until it reaches Osi

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected