aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetalang.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-02-08 09:36:00 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-02-08 16:07:06 -0200
commit8d037108eb0216e178855bb2ba22a09154454ea9 (patch)
treedf204c80ee818acce691357cbef7ea448bd5072d /abstractmetalang.cpp
parent20998c0dc9532630ba549af9a8321cd736c79368 (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.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index 2724d6ce..94114e3e 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;
}
}