diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-02-08 09:36:00 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-02-08 16:07:06 -0200 |
commit | 8d037108eb0216e178855bb2ba22a09154454ea9 (patch) | |
tree | df204c80ee818acce691357cbef7ea448bd5072d /abstractmetalang.cpp | |
parent | 20998c0dc9532630ba549af9a8321cd736c79368 (diff) |
Fix AbstractMetaFunction::implicitConversions.
- Public ctors added by the user with 1 value-type parameter are always added to the implicity
conversion list.
- If the ctor visibility of an function was modified from public to private, the function isn't
added to the result.
Reviewed by Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'abstractmetalang.cpp')
-rw-r--r-- | abstractmetalang.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp index 2724d6ce4..94114e3e9 100644 --- a/abstractmetalang.cpp +++ b/abstractmetalang.cpp @@ -1104,13 +1104,14 @@ AbstractMetaFunctionList AbstractMetaClass::implicitConversions() const { AbstractMetaFunctionList list = queryFunctions(Constructors); AbstractMetaFunctionList returned; + if (!hasCloneOperator()) + return returned; foreach (AbstractMetaFunction *f, list) { if ((f->actualMinimumArgumentCount() == 1 || f->arguments().size() == 1) && !f->isExplicit() && !f->isCopyConstructor() && !f->isModifiedRemoved() - && !f->isUserAdded() - && hasCloneOperator()) { + && (f->originalAttributes() & Public)) { returned += f; } } |