MCPcopy Create free account
hub / github.com/GregoryFaust/samblaster / parseNextInt

Function parseNextInt

samblaster.cpp:730–740  ·  view source on GitHub ↗

This will parse a base 10 int, and change ptr to one char beyond the end of the number.

Source from the content-addressed store, hash-verified

728
729// This will parse a base 10 int, and change ptr to one char beyond the end of the number.
730inline int parseNextInt(char **ptr)
731{
732 int num = 0;
733 for (char curChar = (*ptr)[0]; curChar != 0; curChar = (++(*ptr))[0])
734 {
735 int digit = curChar - '0';
736 if (digit >= 0 && digit <= 9) num = num*10 + digit;
737 else break;
738 }
739 return num;
740}
741
742// This will the current char, and move the ptr ahead by one.
743inline char parseNextOpCode(char **ptr)

Callers 1

processCIGARFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected