KDE/kdelibs/kjs

View: New views
1 Messages — Rating Filter:   Alert me  

KDE/kdelibs/kjs

by Bugzilla from guy-kde@maurel.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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;
_______________________________________________
Khtml-cvs mailing list
Khtml-cvs@...
https://mail.kde.org/mailman/listinfo/khtml-cvs