mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-11 00:10:46 +00:00
Various misc. tweaks and fixes based on static code analysis to minimize/fix memleaks, crashes, or other performance impacting code.
This commit is contained in:
parent
d76c73c252
commit
8956559bfd
44 changed files with 124 additions and 258 deletions
|
|
@ -1579,6 +1579,9 @@ ConsoleValueRef _internalExecute(SimObject *object, S32 argc, ConsoleValueRef ar
|
|||
}
|
||||
bool result;
|
||||
const char* methodRes = CInterface::CallMethod(object, argv[0], argv_str, argc - 2, &result);
|
||||
|
||||
free(argv_str);
|
||||
|
||||
if (result)
|
||||
{
|
||||
return ConsoleValueRef::fromValue(CSTK.pushString(methodRes));
|
||||
|
|
|
|||
|
|
@ -542,6 +542,8 @@ void FieldBrushObject::pasteFields( SimObject* pSimObject )
|
|||
// Force modification of static-fields on target object!
|
||||
pSimObject->setModStaticFields( true );
|
||||
|
||||
S32 prefixLength = dStrlen(INTERNAL_FIELD_PREFIX);
|
||||
|
||||
// Iterate fields.
|
||||
for ( SimFieldDictionaryIterator itr(pFieldDictionary); *itr; ++itr )
|
||||
{
|
||||
|
|
@ -553,7 +555,7 @@ void FieldBrushObject::pasteFields( SimObject* pSimObject )
|
|||
if ( pInternalField == fieldEntry->slotName )
|
||||
{
|
||||
// Yes, so skip the prefix.
|
||||
pInternalField += dStrlen(INTERNAL_FIELD_PREFIX);
|
||||
pInternalField += prefixLength;
|
||||
|
||||
// Is this a static-field on the target object?
|
||||
// NOTE:- We're doing this so we don't end-up creating a dynamic-field if it isn't present.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue