Revision 752 branches/threaded2/src/linad99/optmatch.cpp

optmatch.cpp (revision 752)
9 9
 * Description not yet available.
10 10
 */
11 11
#include <admodel.h>
12
#include <cassert>
12 13

  
13 14
/**
14 15
 * Description not yet available.
15 16
 * \param
16 17
 */
17
 int option_match(int argc,char * argv[],const char * string)
18
 {
19
   int rval=-1;
20
   for (int i=0;i<argc;i++)
21
   {
22
     if (!strcmp(argv[i],string))
23
     {
24
       rval=i;
25
       break;
26
     }
27
   }
28
   return rval;
29
 }
18
int option_match(int argc, char* argv[], const char* string)
19
{
20
  assert(argv != nullptr);
21
  for (int i = 0; i < argc; i++)
22
  {
23
    if (!strcmp(argv[i], string))
24
    {
25
      return i;
26
    }
27
  }
28
  return -1;
29
}
30 30

  
31 31
/**
32 32
 * Description not yet available.

Also available in: Unified diff