Changeset 3606fe4 for src/AST/Type.hpp


Ignore:
Timestamp:
Sep 14, 2022, 9:46:19 AM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
1c0657a
Parents:
fc96890
Message:

Translated Instantiate Generic to the new AST. This includes various utilities and some assorted clean-up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Type.hpp

    rfc96890 r3606fe4  
    8383template< enum Node::ref_type ref_t >
    8484void reset_qualifiers( ptr_base< Type, ref_t > & p, CV::Qualifiers q = {} ) {
    85         if ( p->qualifiers.val != q.val ) p.get_and_mutate()->qualifiers = q;
     85        if ( p->qualifiers != q ) p.get_and_mutate()->qualifiers = q;
    8686}
    8787
     
    8989template< enum Node::ref_type ref_t >
    9090void add_qualifiers( ptr_base< Type, ref_t > & p, CV::Qualifiers q ) {
    91         if ( ( p->qualifiers.val & q.val ) != q.val ) p.get_and_mutate()->qualifiers |= q;
     91        if ( ( p->qualifiers & q ) != q ) p.get_and_mutate()->qualifiers |= q;
    9292}
    9393
     
    9595template< enum Node::ref_type ref_t >
    9696void remove_qualifiers( ptr_base< Type, ref_t > & p, CV::Qualifiers q ) {
    97         if ( ( p->qualifiers.val & q.val ) != 0 ) p.get_and_mutate()->qualifiers -= q;
     97        if ( ( p->qualifiers & q ) != 0 ) p.get_and_mutate()->qualifiers -= q;
    9898}
    9999
Note: See TracChangeset for help on using the changeset viewer.