aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetalang.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-02-03 17:54:32 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-02-03 17:54:32 -0200
commit31234b1869a66d161fd6b916823cae66d03e22f7 (patch)
tree1426dbfcee84e754ef2dfb40a9e7145c9940785a /abstractmetalang.cpp
parent1b3edf359d122cc36378df6ec905e07a77bd8580 (diff)
Do not count user added constructor when searching for implicity conversions.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'abstractmetalang.cpp')
-rw-r--r--abstractmetalang.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index 89934ec8..2724d6ce 100644
--- a/abstractmetalang.cpp
+++ b/abstractmetalang.cpp
@@ -1105,8 +1105,14 @@ AbstractMetaFunctionList AbstractMetaClass::implicitConversions() const
AbstractMetaFunctionList list = queryFunctions(Constructors);
AbstractMetaFunctionList returned;
foreach (AbstractMetaFunction *f, list) {
- if ((f->actualMinimumArgumentCount() == 1 || f->arguments().size() == 1) && !f->isExplicit() && !f->isCopyConstructor() && !f->isModifiedRemoved() && hasCloneOperator())
+ if ((f->actualMinimumArgumentCount() == 1 || f->arguments().size() == 1)
+ && !f->isExplicit()
+ && !f->isCopyConstructor()
+ && !f->isModifiedRemoved()
+ && !f->isUserAdded()
+ && hasCloneOperator()) {
returned += f;
+ }
}
return returned;
}