Ignore:
Timestamp:
Nov 17, 2023, 3:03:51 PM (6 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
f7f997a
Parents:
41606df1
Message:

Most of ResolvExpr? was written before the new style standard. Some files updated, focus on headers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/WidenMode.h

    r41606df1 r2908f08  
    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.