MCPcopy Create free account
hub / github.com/RenderKit/ospray / getArgInt

Function getArgInt

ospray/common/OSPCommon.cpp:95–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95int getArgInt(const std::string &s)
96{
97 std::string value = getArgString(s);
98 try {
99 return std::stoi(value);
100 } catch (...) { // std::invalid_argument or std::out_of_range
101 std::stringstream ss;
102 ss << "Invalid value '" << value << "' in command-line argument " << s
103 << ". Should be an integer";
104 postStatusMsg(ss, OSP_LOG_WARNING);
105 return 0;
106 }
107}
108
109void initFromCommandLine(int *_ac, const char ***_av)
110{

Callers 1

initFromCommandLineFunction · 0.85

Calls 2

getArgStringFunction · 0.85
postStatusMsgFunction · 0.85

Tested by

no test coverage detected