Changeset e748094 for src


Ignore:
Timestamp:
Sep 30, 2024, 10:43:15 AM (4 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
7968301
Parents:
917f67dd
Message:

Bit of clean-up in the Box pass I did while investigating it. 'static' is not needed inside the unnamed namespace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cpp

    r917f67dd re748094  
    16411641{}
    16421642
    1643 static ast::Type * polyToMonoTypeRec( CodeLocation const & loc,
     1643/// Recursive section of polyToMonoType.
     1644ast::Type * polyToMonoTypeRec( CodeLocation const & loc,
    16441645                ast::Type const * ty ) {
    1645         ast::Type * ret;
    16461646        if ( auto aTy = dynamic_cast<ast::ArrayType const *>( ty ) ) {
    1647                 // recursive case
    16481647                auto monoBase = polyToMonoTypeRec( loc, aTy->base );
    1649                 ret = new ast::ArrayType( monoBase, aTy->dimension,
     1648                return new ast::ArrayType( monoBase, aTy->dimension,
    16501649                        aTy->isVarLen, aTy->isStatic, aTy->qualifiers );
    16511650        } else {
    1652                 // base case
    16531651                auto charType = new ast::BasicType( ast::BasicKind::Char );
    16541652                auto size = new ast::NameExpr( loc,
    16551653                        sizeofName( Mangle::mangleType( ty ) ) );
    1656                 ret = new ast::ArrayType( charType, size,
     1654                return new ast::ArrayType( charType, size,
    16571655                        ast::VariableLen, ast::DynamicDim, ast::CV::Qualifiers() );
    16581656        }
    1659         return ret;
    16601657}
    16611658
Note: See TracChangeset for help on using the changeset viewer.