mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 03:45:26 +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
|
|
@ -53,8 +53,9 @@ public:
|
|||
mName = name;
|
||||
|
||||
// Allocate and copy the value.
|
||||
mpValue = new char[ dStrlen(pValue)+1 ];
|
||||
dStrcpy( (char *)mpValue, pValue, dStrlen(pValue) + 1 );
|
||||
dsize_t valueLen = dStrlen(pValue) + 1;
|
||||
mpValue = new char[ valueLen ];
|
||||
dStrcpy( (char *)mpValue, pValue, valueLen );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue