Changeset 2233ad4 for libcfa/src/bits


Ignore:
Timestamp:
Jun 26, 2019, 5:30:50 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
bd87a9ad
Parents:
0d8266c
Message:

change queue/deque != 0 to return int instead of bool, add != 0 to stack

File:
1 edited

Legend:

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

    r0d8266c r2233ad4  
    99// Author           : Thierry Delisle
    1010// Created On       : Tue Oct 31 16:38:50 2017
    11 // Last Modified By : --
    12 // Last Modified On : --
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Jun 26 08:52:20 2019
     13// Update Count     : 4
    1414
    1515#pragma once
     
    115115                }
    116116                return top;
     117        }
     118
     119        forall(dtype T | is_node(T))
     120        static inline int ?!=?( const __stack(T) & this, __attribute__((unused)) zero_t zero ) {
     121                return this.top != 0;
    117122        }
    118123#endif
     
    186191
    187192        forall(dtype T | is_node(T))
    188         static inline bool ?!=?( __queue(T) & this, __attribute__((unused)) zero_t zero ) {
     193        static inline int ?!=?( const __queue(T) & this, __attribute__((unused)) zero_t zero ) {
    189194                return this.head != 0;
    190195        }
     
    268273
    269274        forall(dtype T | sized(T))
    270         static inline bool ?!=?( __dllist(T) & this, __attribute__((unused)) zero_t zero ) {
     275        static inline int ?!=?( const __dllist(T) & this, __attribute__((unused)) zero_t zero ) {
    271276                return this.head != 0;
    272277        }
Note: See TracChangeset for help on using the changeset viewer.