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
ed10ce2511
commit
6b024b21bf
33 changed files with 171 additions and 114 deletions
|
|
@ -182,8 +182,9 @@ extern "C" {
|
|||
|
||||
void torque_setexecutablepath(const char* directory)
|
||||
{
|
||||
gExecutablePath = new char[dStrlen(directory)+1];
|
||||
dStrcpy(gExecutablePath, directory, dStrlen(directory)+1);
|
||||
dsize_t pathLen = dStrlen(directory) + 1;
|
||||
gExecutablePath = new char[pathLen];
|
||||
dStrcpy(gExecutablePath, directory, pathLen);
|
||||
}
|
||||
|
||||
// set Torque 3D into web deployment mode (disable fullscreen exlusive mode, etc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue