Ignore:
Timestamp:
Oct 9, 2024, 5:07:59 PM (5 weeks ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
0766399
Parents:
1b770e40
Message:

Replaced SemanticErrorException::isEmpty with ...::throwIfNonEmpty. This is how it was used in every context and it saves a bit of text (if not two lines) at every use. I considered putting this function in the header for better inlining, but this should have at least the same preformance as the last version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cpp

    r1b770e40 r16ba4897  
    829829        } // for
    830830
    831         if ( ! errors.isEmpty() ) {
    832                 throw errors;
    833         } // if
     831        errors.throwIfNonEmpty();
    834832} // buildList
    835833
     
    879877        } // for
    880878
    881         if ( ! errors.isEmpty() ) {
    882                 throw errors;
    883         } // if
     879        errors.throwIfNonEmpty();
    884880} // buildList
    885881
     
    897893        } // for
    898894
    899         if ( ! errors.isEmpty() ) {
    900                 throw errors;
    901         } // if
     895        errors.throwIfNonEmpty();
    902896} // buildTypeList
    903897
Note: See TracChangeset for help on using the changeset viewer.