MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / strToInt

Function strToInt

source/link/fnvar.cpp:331–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331bool strToInt(std::string s, uint32_t* x) {
332 for (const char& c : s) {
333 if (c < '0' || c > '9') {
334 return false;
335 }
336 }
337 if (!(std::stringstream(s) >> *x)) {
338 return false;
339 }
340 return true;
341}
342
343} // anonymous namespace
344

Callers 1

ProcessFnVarMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected