MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / StringToInt

Function StringToInt

src/apps/ocioconvert/main.cpp:727–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725}
726
727bool StringToInt(int * ival, const char * str)
728{
729 if (!str)
730 {
731 return false;
732 }
733
734 std::istringstream inputStringstream(str);
735 int x;
736 if (!(inputStringstream >> x))
737 {
738 return false;
739 }
740
741 if (ival)
742 {
743 *ival = x;
744 }
745 return true;
746}

Callers 2

mainFunction · 0.70
OCIO_ADD_TESTFunction · 0.50

Calls

no outgoing calls

Tested by 1

OCIO_ADD_TESTFunction · 0.40