Ignore:
Timestamp:
Mar 5, 2024, 9:55:04 AM (3 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
af60383
Parents:
9262fe9
Message:

Removed casts around get_next (also replaced with direct field access) that are no longer needed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r9262fe9 r44adf1b  
    127127
    128128        // Start at second variable in declaration list and clone the type specifiers for each variable.
    129         for ( DeclarationNode * cur = dynamic_cast<DeclarationNode *>( declList->get_next() ); cur != nullptr; cur = dynamic_cast<DeclarationNode *>( cur->get_next() ) ) {
     129        for ( DeclarationNode * cur = declList->next ; cur != nullptr; cur = cur->next ) {
    130130                cl->cloneBaseType( cur, copyattr );                             // cur is modified
    131131        } // for
     
    139139void distExt( DeclarationNode * declaration ) {
    140140        // distribute EXTENSION across all declarations
    141         for ( DeclarationNode *iter = declaration; iter != nullptr; iter = (DeclarationNode *)iter->get_next() ) {
     141        for ( DeclarationNode *iter = declaration ; iter != nullptr ; iter = iter->next ) {
    142142                iter->set_extension( true );
    143143        } // for
     
    146146void distInl( DeclarationNode * declaration ) {
    147147        // distribute INLINE across all declarations
    148         for ( DeclarationNode *iter = declaration; iter != nullptr; iter = (DeclarationNode *)iter->get_next() ) {
     148        for ( DeclarationNode *iter = declaration ; iter != nullptr ; iter = iter->next ) {
    149149                iter->set_inLine( true );
    150150        } // for
     
    153153void distQual( DeclarationNode * declaration, DeclarationNode * qualifiers ) {
    154154        // distribute qualifiers across all non-variable declarations in a distribution statemement
    155         for ( DeclarationNode * iter = declaration; iter != nullptr; iter = (DeclarationNode *)iter->get_next() ) {
     155        for ( DeclarationNode * iter = declaration ; iter != nullptr ; iter = iter->next ) {
    156156                // SKULLDUGGERY: Distributions are parsed inside out, so qualifiers are added to declarations inside out. Since
    157157                // addQualifiers appends to the back of the list, the forall clauses are in the wrong order (right to left). To
Note: See TracChangeset for help on using the changeset viewer.