Lots of optimizations

This commit is contained in:
FlightControl_Master
2018-04-12 13:59:55 +02:00
parent dcc42b8e62
commit fea2f55fbb
16 changed files with 261 additions and 189 deletions

View File

@@ -149,7 +149,7 @@ end
-- @param #SET_BASE self
-- @param #string ObjectName
function SET_BASE:Remove( ObjectName )
self:F( { ObjectName = ObjectName, Object = Object } )
self:F2( { ObjectName = ObjectName } )
local Object = self.Set[ObjectName]
@@ -158,7 +158,6 @@ function SET_BASE:Remove( ObjectName )
if Key == ObjectName then
table.remove( self.Index, Index )
self.Set[ObjectName] = nil
self:Flush(self)
break
end
end
@@ -174,7 +173,7 @@ end
-- @param Core.Base#BASE Object
-- @return Core.Base#BASE The added BASE Object.
function SET_BASE:Add( ObjectName, Object )
self:F( { ObjectName = ObjectName, Object = Object } )
self:F2( { ObjectName = ObjectName, Object = Object } )
-- Ensure that the existing element is removed from the Set before a new one is inserted to the Set
if self.Set[ObjectName] then