Ignore:
Timestamp:
Nov 17, 2023, 3:23:48 PM (7 months ago)
Author:
caparson <caparson@…>
Branches:
master
Children:
decd4a6
Parents:
16e0dcb (diff), 2908f08 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/WidenMode.h

    r16e0dcb rf7f997a  
    1717
    1818namespace ResolvExpr {
    19         struct WidenMode {
    20                 WidenMode( bool first, bool second ): first( first ), second( second ) {}
    2119
    22                 WidenMode &operator|=( const WidenMode &other ) {
    23                         first |= other.first; second |= other.second; return *this;
    24                 }
     20struct WidenMode {
     21        WidenMode( bool first, bool second ): first( first ), second( second ) {}
    2522
    26                 WidenMode &operator&=( const WidenMode &other ) {
    27                         first &= other.first; second &= other.second; return *this;
    28                 }
     23        WidenMode &operator|=( const WidenMode &other ) {
     24                first |= other.first; second |= other.second; return *this;
     25        }
    2926
    30                 WidenMode operator|( const WidenMode &other ) {
    31                         WidenMode newWM( *this ); newWM |= other; return newWM;
    32                 }
     27        WidenMode &operator&=( const WidenMode &other ) {
     28                first &= other.first; second &= other.second; return *this;
     29        }
    3330
    34                 WidenMode operator&( const WidenMode &other ) {
    35                         WidenMode newWM( *this ); newWM &= other; return newWM;
    36                 }
     31        WidenMode operator|( const WidenMode &other ) {
     32                WidenMode newWM( *this ); newWM |= other; return newWM;
     33        }
    3734
    38                 operator bool() { return first && second; }
     35        WidenMode operator&( const WidenMode &other ) {
     36                WidenMode newWM( *this ); newWM &= other; return newWM;
     37        }
    3938
    40                 bool first : 1, second : 1;
    41         };
     39        operator bool() { return first && second; }
    4240
    43         static inline WidenMode noWiden() { return { false, false }; }
     41        bool first : 1, second : 1;
     42};
     43
     44static inline WidenMode noWiden() { return { false, false }; }
     45
    4446} // namespace ResolvExpr
    4547
Note: See TracChangeset for help on using the changeset viewer.