summaryrefslogtreecommitdiffstats
path: root/overloaddata.h
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2009-11-10 11:07:44 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-11-10 19:35:19 -0200
commit94e356425a022e787d86007061977bc4aa01e413 (patch)
tree26eab63788c7093a7c17f5e8a2e72ab28d6bdf43 /overloaddata.h
parent81abd420131ed0897f8b21b6c21d6cffb6c68181 (diff)
downloadshiboken-94e356425a022e787d86007061977bc4aa01e413.tar.gz
shiboken-94e356425a022e787d86007061977bc4aa01e413.tar.xz
shiboken-94e356425a022e787d86007061977bc4aa01e413.zip
Sorting overloads topologically
Instead of using the current weight-based overload sorting, sort them topologically based on implicit conversions. Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'overloaddata.h')
-rw-r--r--overloaddata.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/overloaddata.h b/overloaddata.h
index f80ce84d..373dba25 100644
--- a/overloaddata.h
+++ b/overloaddata.h
@@ -65,8 +65,6 @@ public:
void dumpGraph(QString filename) const;
QString dumpGraph() const;
- int argTypeWeight() const { return m_argTypeWeight; }
-
~OverloadData();
private:
@@ -76,6 +74,8 @@ private:
void addOverload(const AbstractMetaFunction* func);
OverloadData* addOverloadData(const AbstractMetaFunction* func, const AbstractMetaType* argType);
+ void sortOverloads();
+
int functionNumber(const AbstractMetaFunction* func) const;
OverloadDataList overloadDataOnPosition(OverloadData* overloadData, int argPos) const;
@@ -83,7 +83,6 @@ private:
int m_maxArgs;
int m_argPos;
const AbstractMetaType* m_argType;
- int m_argTypeWeight;
QList<const AbstractMetaFunction*> m_overloads;
OverloadData* m_headOverloadData;