mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
As suggested, extract strlen calls from sizes into variables so it isn't called twice
This commit is contained in:
parent
ed10ce2511
commit
6b024b21bf
33 changed files with 171 additions and 114 deletions
|
|
@ -194,8 +194,9 @@ bool afxXM_PathConformData::onAdd()
|
|||
if (paths_string != ST_NULLSTRING)
|
||||
{
|
||||
Vector<char*> dataBlocks(__FILE__, __LINE__);
|
||||
char* tokCopy = new char[dStrlen(paths_string) + 1];
|
||||
dStrcpy(tokCopy, paths_string, dStrlen(paths_string) + 1);
|
||||
dsize_t tokCopyLen = dStrlen(paths_string) + 1;
|
||||
char* tokCopy = new char[tokCopyLen];
|
||||
dStrcpy(tokCopy, paths_string, tokCopyLen);
|
||||
|
||||
char* currTok = dStrtok(tokCopy, " \t");
|
||||
while (currTok != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue