Changeset 19de7864 for libcfa/src


Ignore:
Timestamp:
Dec 17, 2020, 12:28:03 PM (4 years ago)
Author:
Colby Alexander Parsons <caparsons@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
7522692
Parents:
28e88d7
Message:

removed listed requirement for collections since it was redundant

Location:
libcfa/src/bits
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/collection.hfa

    r28e88d7 r19de7864  
    3535        //              return (T *)Next( (Colable *)n );
    3636        //      }
    37 
    38         //      bool listed( T * n ) {
    39         //              return Next( (Colable *)n ) != 0p;
    40         //      }
    4137        // } // distribution
    4238} // distribution
    4339
     40forall( dtype T | { T *& Next ( T * ); } ) {
     41        bool listed( T * n ) {
     42                return Next( n ) != 0p;
     43        }
     44}
    4445
    4546struct Collection {
  • libcfa/src/bits/queue.hfa

    r28e88d7 r19de7864  
    33#include "bits/collection.hfa"
    44
    5 forall( dtype T | { T *& Next ( T * ); bool listed ( T * ); } ) {
     5forall( dtype T | { T *& Next ( T * ); } ) {
    66        struct Queue {
    77                inline Collection;                                                              // Plan 9 inheritance
     
    142142} // distribution
    143143
    144 forall( dtype T | { T *& Next ( T * ); bool listed ( T * ); } ) {
     144forall( dtype T | { T *& Next ( T * ); } ) {
    145145        struct QueueIter {
    146146                inline ColIter;                                                                 // Plan 9 inheritance
  • libcfa/src/bits/sequence.hfa

    r28e88d7 r19de7864  
    3636} // distribution
    3737
    38 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); bool listed ( T * ); } ) {
     38forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); } ) {
    3939        struct Sequence {
    4040                inline Collection;                                                              // Plan 9 inheritance
     
    216216} // distribution
    217217
    218 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); bool listed ( T * ); } ) {
     218forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); } ) {
    219219        // SeqIter(T) is used to iterate over a Sequence(T) in head-to-tail order.
    220220        struct SeqIter {
  • libcfa/src/bits/stack.hfa

    r28e88d7 r19de7864  
    33#include "bits/collection.hfa"
    44
    5 forall( dtype T | { T *& Next ( T * ); bool listed ( T * ); } ) {
     5forall( dtype T | { T *& Next ( T * ); } ) {
    66        struct Stack {
    77                inline Collection;                                                              // Plan 9 inheritance
     
    5858
    5959
    60 forall( dtype T | { T *& Next ( T * ); bool listed ( T * ); } ) {
     60forall( dtype T | { T *& Next ( T * ); } ) {
    6161        struct StackIter {
    6262                inline ColIter;                                                                 // Plan 9 inheritance
Note: See TracChangeset for help on using the changeset viewer.