Changes in / [f6bbc92:1d8a349]


Ignore:
Location:
libcfa/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/enum.cfa

    rf6bbc92 r1d8a349  
    1111                // It is okay to overflow as overflow will be theoretically caught by the other bound
    1212                if ( i < fromInstance( lower ) || i > fromInstance( upper ) )
    13                         abort( "call to fromInt has index %d outside of enumeration range %d-%d.",
     13                        abort( "call to fromInt has index %d outside enumeration range %d-%d",
    1414                                   i, fromInstance( lower ), fromInstance( upper ) );
    1515                return fromInt_unsafe( i );
     
    1919                E upper = upperBound();
    2020                if ( fromInstance( e ) >= fromInstance( upper ) )
    21                         abort( "call to succ() exceeds enumeration upper bound of %d.", fromInstance( upper ) );
     21                        abort( "call to succ() exceeds enumeration upper bound of %d", fromInstance( upper ) );
    2222                return succ_unsafe(e);
    2323        }
     
    2626                E lower = lowerBound();
    2727                if ( fromInstance( e ) <= fromInstance(lower ) )
    28                         abort( "call to pred() exceeds enumeration lower bound of %d.", fromInstance( lower ) );
     28                        abort( "call to pred() exceeds enumeration lower bound of %d", fromInstance( lower ) );
    2929                return pred_unsafe( e );
    3030        }
    3131
    32         int Countof( E ) {
     32        int Countof( __attribute__((unused)) E e ) {
    3333                E upper = upperBound();
    3434                E lower = lowerBound();
  • libcfa/src/enum.hfa

    rf6bbc92 r1d8a349  
    1919        E succ( E e );
    2020        E pred( E e );
    21         int Countof( E );
     21        int Countof( E e );
    2222}
    2323
Note: See TracChangeset for help on using the changeset viewer.