mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +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
|
|
@ -528,8 +528,7 @@ void GuiMLTextCtrl::inspectPostApply()
|
|||
|
||||
setText(mInitialText, dStrlen(mInitialText));
|
||||
|
||||
if (mLineSpacingPixels < 0)
|
||||
mLineSpacingPixels = 0;
|
||||
mLineSpacingPixels = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ DefineEngineMethod(GuiVariableInspector, addField, void, (const char* name, cons
|
|||
const char* description, const char* defaultValue, const char* dataValues, SimObject* ownerObj),
|
||||
("","","","","", "", nullAsType<SimObject*>()), "addField( fieldName/varName, fieldLabel, fieldTypeName, description, defaultValue, defaultValues, ownerObject )")
|
||||
{
|
||||
if (name == "" || typeName == "")
|
||||
if (dStrEqual(name, "") || dStrEqual(typeName, ""))
|
||||
return;
|
||||
|
||||
object->addField(name, label, typeName, description, defaultValue, dataValues, "", ownerObj);
|
||||
|
|
@ -278,7 +278,7 @@ DefineEngineMethod(GuiVariableInspector, addCallbackField, void, (const char* na
|
|||
const char* description, const char* defaultValue, const char* dataValues, const char* callbackName, SimObject* ownerObj),
|
||||
("", "", "", "", "", "", nullAsType<SimObject*>()), "addField( fieldName/varName, fieldLabel, fieldTypeName, description, defaultValue, defaultValues, callbackName, ownerObject )")
|
||||
{
|
||||
if (name == "" || typeName == "")
|
||||
if (dStrEqual(name, "") || dStrEqual(typeName, ""))
|
||||
return;
|
||||
|
||||
object->addCallbackField(name, label, typeName, description, defaultValue, dataValues, callbackName, ownerObj);
|
||||
|
|
|
|||
|
|
@ -4042,23 +4042,6 @@ bool WorldEditor::makeSelectionAMesh(const char *filename)
|
|||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
// Allocate TSStatic object and add to level.
|
||||
TSStatic *ts = new TSStatic();
|
||||
ts->setShapeFileName(StringTable->insert(filename));
|
||||
fabMat.inverse();
|
||||
ts->setTransform(fabMat);
|
||||
ts->registerObject();
|
||||
scene->addObject(ts);
|
||||
|
||||
// Select it, mark level as dirty.
|
||||
clearSelection();
|
||||
selectObject(ts);
|
||||
setDirty();
|
||||
|
||||
// Delete original objects and temporary SimGroup.
|
||||
for (S32 i = 0; i < objectList.size(); i++)
|
||||
objectList[i]->deleteObject();
|
||||
}
|
||||
|
||||
DefineEngineMethod( WorldEditor, makeSelectionPrefab, void, ( const char* filename, bool dontDeleteOriginals ), (false),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue