Changeset View
Changeset View
Standalone View
Standalone View
duchain/viablefunctions.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
55 | void ViableFunction::matchParameters( const OverloadResolver::ParameterList& params, bool partial ) { | 55 | void ViableFunction::matchParameters( const OverloadResolver::ParameterList& params, bool partial ) { | ||
56 | if( !isValid() || !m_topContext ) | 56 | if( !isValid() || !m_topContext ) | ||
57 | return; | 57 | return; | ||
58 | Q_ASSERT(m_funDecl); | 58 | Q_ASSERT(m_funDecl); | ||
59 | 59 | | |||
60 | uint functionArgumentCount = m_type->indexedArgumentsSize(); | 60 | uint functionArgumentCount = m_type->indexedArgumentsSize(); | ||
61 | 61 | | |||
62 | if( params.parameters.size() + m_funDecl->defaultParametersSize() < functionArgumentCount && !partial ) { | 62 | if( params.parameters.size() + m_funDecl->defaultParametersSize() < functionArgumentCount && !partial ) { | ||
63 | //kDebug() << "Not enough parameters + default-parameters"; | 63 | //qDebug() << "Not enough parameters + default-parameters"; | ||
64 | return; //Not enough parameters + default-parameters | 64 | return; //Not enough parameters + default-parameters | ||
65 | } | 65 | } | ||
66 | if( params.parameters.size() > functionArgumentCount ) { | 66 | if( params.parameters.size() > functionArgumentCount ) { | ||
67 | //kDebug() << "Too many parameters" << params.parameters.size() << "gt" << functionArgumentCount; | 67 | //qDebug() << "Too many parameters" << params.parameters.size() << "gt" << functionArgumentCount; | ||
68 | return; //Too many parameters | 68 | return; //Too many parameters | ||
69 | } | 69 | } | ||
70 | 70 | | |||
71 | m_parameterCountMismatch = false; | 71 | m_parameterCountMismatch = false; | ||
72 | //Match all parameters against the argument-type | 72 | //Match all parameters against the argument-type | ||
73 | const IndexedType* arguments = m_type->indexedArguments(); | 73 | const IndexedType* arguments = m_type->indexedArguments(); | ||
74 | const IndexedType* argumentIt = arguments; | 74 | const IndexedType* argumentIt = arguments; | ||
75 | 75 | | |||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |