Changeset 16ba4897 for src/InitTweak


Ignore:
Timestamp:
Oct 9, 2024, 5:07:59 PM (2 months 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/InitTweak/FixInit.cpp

    r1b770e40 r16ba4897  
    301301                } // try
    302302        } // for
    303         if ( ! errors.isEmpty() ) {
    304                 throw errors;
    305         } // if
     303        errors.throwIfNonEmpty();
    306304}
    307305
     
    11731171                function->stmts = mutStmts;
    11741172        }
    1175         if (! errors.isEmpty()) {
    1176                 throw errors;
    1177         }
     1173        errors.throwIfNonEmpty();
    11781174        return function;
    11791175}
Note: See TracChangeset for help on using the changeset viewer.