mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-23 05:15:34 +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
|
|
@ -594,8 +594,9 @@ bool ParticleData::preload(bool server, String &errorStr)
|
|||
|
||||
animTexFrames.clear();
|
||||
|
||||
char* tokCopy = new char[dStrlen(animTexFramesString) + 1];
|
||||
dStrcpy(tokCopy, animTexFramesString, dStrlen(animTexFramesString) + 1);
|
||||
dsize_t tokLen = dStrlen(animTexFramesString) + 1;
|
||||
char* tokCopy = new char[tokLen];
|
||||
dStrcpy(tokCopy, animTexFramesString, tokLen);
|
||||
|
||||
char* currTok = dStrtok(tokCopy, " \t");
|
||||
while (currTok != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue