Changeset a797e2b1 for src/libcfa


Ignore:
Timestamp:
Jul 6, 2016, 2:46:20 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
e04c5ff
Parents:
fcf041c
Message:

remove const from parameters to remove warnings from incorrectly generated code

Location:
src/libcfa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/stdlib

    rfcf041c ra797e2b1  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul  5 09:56:31 2016
    13 // Update Count     : 98
     12// Last Modified On : Wed Jul  6 14:28:55 2016
     13// Update Count     : 99
    1414//
    1515
     
    7676
    7777forall( otype T | { int ?<?( T, T ); } )
    78 T * bsearch( const T key, const T * arr, size_t dimension );
     78T * bsearch( T key, const T * arr, size_t dimension );
    7979
    8080forall( otype T | { int ?<?( T, T ); } )
     
    116116
    117117forall( otype T | { int ?<?( T, T ); } )
    118 T min( const T t1, const T t2 );
     118T min( T t1, T t2 );
    119119
    120120forall( otype T | { int ?>?( T, T ); } )
    121 T max( const T t1, const T t2 );
     121T max( T t1, T t2 );
    122122
    123123forall( otype T | { T min( T, T ); T max( T, T ); } )
    124 T clamp( const T value, const T min_val, const T max_val );
     124T clamp( T value, T min_val, T max_val );
    125125
    126126forall( otype T )
  • src/libcfa/stdlib.c

    rfcf041c 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.