From kde-commits Mon Nov 02 17:45:15 2009 From: Guy Maurel Date: Mon, 02 Nov 2009 17:45:15 +0000 To: kde-commits Subject: KDE/kdelibs/kjs Message-Id: <1257183915.933090.13232.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=125718392429802 SVN commit 1043929 by guymaurel: change the signature of "getParameterName" and adjust the caller M +3 -3 function.cpp M +1 -1 scriptfunction.h --- trunk/KDE/kdelibs/kjs/function.cpp #1043928:1043929 @@ -285,7 +285,7 @@ * it appears associates with it. eg: * function f2(x, x): getParameterName(0) --> null */ -Identifier FunctionImp::getParameterName(int index) +Identifier FunctionImp::getParameterName(size_t index) { if (index >= body->numParams()) return CommonIdentifiers::shared()->nullIdentifier; @@ -293,7 +293,7 @@ Identifier name = body->paramName(index); // Are there any subsequent parameters with the same name? - for (int pos = index + 1; pos < body->numParams(); ++pos) + for (size_t pos = index + 1; pos < body->numParams(); ++pos) if (body->paramName(pos) == name) return CommonIdentifiers::shared()->nullIdentifier; @@ -341,7 +341,7 @@ _map = new Identifier[args.size()]; this->size = args.size(); - int i = 0; + size_t i = 0; ListIterator iterator = args.begin(); for (; iterator != args.end(); i++, iterator++) _map[i] = func->getParameterName(i); // null if there is no corresponding parameter --- trunk/KDE/kdelibs/kjs/scriptfunction.h #1043928:1043929 @@ -55,7 +55,7 @@ // Note: unlike body->paramName, this returns Identifier::null for parameters // that will never get set, due to later param having the same name - Identifier getParameterName(int index); + Identifier getParameterName(size_t index); virtual const ClassInfo *classInfo() const { return &info; } static const ClassInfo info;