From c20163c1a464578b15f417a5a389b144cefbd82b Mon Sep 17 00:00:00 2001 From: Mauro Iazzi Date: Mon, 19 May 2008 14:07:21 +0200 Subject: [PATCH] copy constructor is recognized --- new/generator.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/new/generator.lua b/new/generator.lua index 16d2b84..00d7955 100644 --- a/new/generator.lua +++ b/new/generator.lua @@ -869,9 +869,15 @@ local fill_special_methods = function(index, functions) for c in pairs(index) do local construct, destruct = {}, nil local n = c.xarg.name - local auto = true + local auto, copy = true, nil for _, f in ipairs(c) do - if n==f.xarg.name then auto = false end + if n==f.xarg.name then + auto = false + if #f==1 and + f[1].xarg.type_name==(n..' const&') then + copy = f + end + end if functions[f] then if n==f.xarg.name then table.insert(construct, f) @@ -881,6 +887,7 @@ local fill_special_methods = function(index, functions) end end construct.auto = auto + construct.copy = copy c.constructors = construct c.destructor = destruct end -- 2.11.4.GIT