Changeset 859 for applications/doprava

Show
Ignore:
Timestamp:
03/08/10 19:15:45 (14 years ago)
Author:
prikryl
Message:

New function _search_index().

Location:
applications/doprava/aimsun_bdm
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • applications/doprava/aimsun_bdm/tools.cpp

    r825 r859  
    183183        return 0; 
    184184} 
     185 
     186int _search_index ( const int *list, int numElements, int value ) 
     187{ 
     188        int i; 
     189        for ( i = 0 ; i < numElements ; i++ ) 
     190        { 
     191                if ( *list == value ) break; 
     192                list++; 
     193        } 
     194        if ( i >= numElements ) i = -1; 
     195        return i; 
     196 
     197} 
  • applications/doprava/aimsun_bdm/tools.h

    r825 r859  
    1717        ); 
    1818         
     19int _search_index ( const int *list, int numElements, int value ); 
     20 
    1921#endif