Changeset e49c308 for libcfa


Ignore:
Timestamp:
Aug 7, 2024, 6:48:39 AM (4 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
f6bbc92
Parents:
5fdaeab1
Message:

remove unused parameter name from function Countof, add period to end of error messages

Location:
libcfa/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/enum.cfa

    r5fdaeab1 re49c308  
    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 enumeration range %d-%d",
     13                        abort( "call to fromInt has index %d outside of 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( __attribute__((unused)) E e ) {
     32        int Countof( E ) {
    3333                E upper = upperBound();
    3434                E lower = lowerBound();
  • libcfa/src/enum.hfa

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