MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / _getArraySize

Function _getArraySize

Extras/Serialize/HeaderGenerator/apiGen.cpp:335–353  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

333
334///////////////////////////////////////////////////////////////////////////////
335int _getArraySize(char *str)
336{
337 int a, mul = 1;
338 char stri[100], *cp = 0;
339 int len = (int)strlen(str);
340
341 memcpy(stri, str, len + 1);
342 for (a = 0; a < len; a++)
343 {
344 if (str[a] == '[')
345 cp = &(stri[a + 1]);
346 else if (str[a] == ']' && cp)
347 {
348 stri[a] = 0;
349 mul *= atoi(cp);
350 }
351 }
352 return mul;
353}
354
355///////////////////////////////////////////////////////////////////////////////
356bVariable::bVariable()

Callers 1

initializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected