Skip to content
Snippets Groups Projects
Commit 26eec1a4 authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@1121 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9914b2ff
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,7 @@ function _M:clone(t)
end
local function clonerecursfull(clonetable, d)
local function clonerecursfull(clonetable, d, allow_cloned)
local n = {}
clonetable[d] = n
......@@ -126,13 +126,14 @@ local function clonerecursfull(clonetable, d)
n[nk] = ne
end
setmetatable(n, getmetatable(d))
if n.cloned then n:cloned(d) end
return n
end
--- Clones the object, all subobjects without cloning twice a subobject
function _M:cloneFull()
function _M:cloneFull(allow_cloned)
local clonetable = {}
local n = clonerecursfull(clonetable, self)
local n = clonerecursfull(clonetable, self, allow_cloned)
return n
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment