documentor: Fixed warnings
authorJerome St-Louis <jerome@ecere.com>
Tue, 1 Mar 2016 18:25:36 +0000 (13:25 -0500)
committerJerome St-Louis <jerome@ecere.com>
Thu, 28 Jul 2016 22:23:18 +0000 (18:23 -0400)
documentor/src/Documentor.ec

index b5b72d4..6b39b82 100644 (file)
@@ -692,20 +692,9 @@ static char * ReadDoc(Module module, DocumentationType type, void * object, Docu
          case parameter:
             if((type == functionDoc && fnDoc && fnDoc.parameters) || (type == methodDoc && mdDoc && mdDoc.parameters))
             {
-               Type prev;
-               char * name;
-               for(prev = data; prev; prev = prev.prev);
-               name = ((Type)data).name;
-               if(type == functionDoc)
-               {
-                  itDoc = fnDoc.parameters[name];
-                  if(itDoc) s = itDoc.description;
-               }
-               else if(type == methodDoc)
-               {
-                  itDoc = mdDoc.parameters[name];
-                  if(itDoc) s = itDoc.description;
-               }
+               char * name = ((Type)data).name;
+               itDoc = ((type == functionDoc) ? fnDoc.parameters : mdDoc.parameters)[name] ;
+               if(itDoc) s = itDoc.description;
             }
             break;
       }