Ignore:
Timestamp:
Jul 3, 2026, 9:31:49 AM (2 days ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Parents:
de851d0
Message:

fold temporary for const_cast into single expression

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixGlobalInit.cpp

    rde851d0 r3859adb  
    1010// Created On       : Mon May 04 15:14:56 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul  2 16:39:52 2026
    13 // Update Count     : 35
     12// Last Modified On : Fri Jul  3 08:41:54 2026
     13// Update Count     : 37
    1414//
    1515
     
    7979                // Remove const qualifier from matching names, covering all forward declaration(s) and definition.
    8080                if ( constDeclsMnames.find( objDecl->mangleName ) != constDeclsMnames.end() ) {
    81                         ast::Type * fred = const_cast<ast::Type *>(mutDecl->get_type());
    82                         fred->set_const( false );
     81                        // SKULLDUGGERY: change value through const pointer.
     82                        const_cast<ast::Type *>(objDecl->get_type())->set_const( false );
    8383                } // if
    8484        }
Note: See TracChangeset for help on using the changeset viewer.