Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/stdlib.c

    ra9f2c13 ra797e2b1  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun 30 15:04:25 2016
    13 // Update Count     : 168
     12// Last Modified On : Wed Jul  6 14:28:57 2016
     13// Update Count     : 169
    1414//
    1515
     
    200200
    201201forall( otype T | { int ?<?( T, T ); } )
    202 T * bsearch( const T key, const T * arr, size_t dimension ) {
     202T * bsearch( T key, const T * arr, size_t dimension ) {
    203203        int comp( const void * t1, const void * t2 ) { return *(T *)t1 < *(T *)t2 ? -1 : *(T *)t2 < *(T *)t1 ? 1 : 0; }
    204204        return (T *)bsearch( &key, arr, dimension, sizeof(T), comp );
     
    245245
    246246forall( otype T | { int ?<?( T, T ); } )
    247 T min( const T t1, const T t2 ) {
     247T min( T t1, T t2 ) {
    248248        return t1 < t2 ? t1 : t2;
    249249} // min
    250250
    251251forall( otype T | { int ?>?( T, T ); } )
    252 T max( const T t1, const T t2 ) {
     252T max( T t1, T t2 ) {
    253253        return t1 > t2 ? t1 : t2;
    254254} // max
    255255
    256256forall( otype T | { T min( T, T ); T max( T, T ); } )
    257 T clamp( const T value, const T min_val, const T max_val ) {
     257T clamp( T value, T min_val, T max_val ) {
    258258        return max( min_val, min( value, max_val ) );
    259259} // clamp
Note: See TracChangeset for help on using the changeset viewer.