mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
As suggested, extract strlen calls from sizes into variables so it isn't called twice
This commit is contained in:
parent
eab086e184
commit
47d5b6ead7
33 changed files with 171 additions and 114 deletions
|
|
@ -167,8 +167,9 @@ bool guiAnimBitmapCtrl::ptSetFrameRanges(void *object, const char *index, const
|
|||
pData->mCurFrameIndex = pData->mNumFrames;
|
||||
return true;
|
||||
}
|
||||
char* tokCopy = new char[dStrlen(data) + 1];
|
||||
dStrcpy(tokCopy, data, dStrlen(data) + 1);
|
||||
dsize_t tokLen = dStrlen(data) + 1;
|
||||
char* tokCopy = new char[tokLen];
|
||||
dStrcpy(tokCopy, data, tokLen);
|
||||
|
||||
char* currTok = dStrtok(tokCopy, " \t");
|
||||
while (currTok != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue