Ignore:
Timestamp:
Jul 12, 2007, 2:58:26 AM (17 years ago)
Author:
dai_9181
Message:

コード全体のリファクタリングを実施

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/ParamImpl.cpp

    r182 r206  
     1#include "stdafx.h"
     2
    13#include <Program.h>
    24
     
    197199}
    198200
    199 UserProc *ParamImpl::_OverloadSolution( const char *name, std::vector<UserProc *> &subs, bool isEnabledReturnType ){
     201const UserProc *ParamImpl::_OverloadSolution( const char *name, std::vector<const UserProc *> &subs, bool isEnabledReturnType ){
    200202    int sw=0;
    201     UserProc *pUserProc;
     203    const UserProc *pUserProc;
    202204    pUserProc=0;
    203205
    204206    for( int level=OVERLOAD_MIN_LEVEL; level<=OVERLOAD_MAX_LEVEL; level++ ){
    205207
    206         BOOST_FOREACH( UserProc *pTempUserProc, subs ){
     208        BOOST_FOREACH( const UserProc *pTempUserProc, subs ){
    207209
    208210            if(EvaluateOverloadScore( level, pTempUserProc->Params(), isEnabledReturnType?pTempUserProc->ReturnType():Type() )){
     
    237239
    238240    if(!sw){
    239         BOOST_FOREACH( UserProc *pTempUserProc, subs ){
     241        BOOST_FOREACH( const UserProc *pTempUserProc, subs ){
    240242
    241243            //エラーチェック
     
    261263    return pUserProc;
    262264}
    263 UserProc *ParamImpl::OverloadSolution( const char *name, std::vector<UserProc *> &subs, bool isEnabledReturnType ){
     265const UserProc *ParamImpl::OverloadSolution( const char *name, std::vector<const UserProc *> &subs, bool isEnabledReturnType ){
    264266    trace_for_overload( "" );
    265267    trace_for_overload( "■■■■■■■■■■■■■■■■■■" );
    266268    trace_for_overload( "■■■ オーバーロード解決(" << name << ")" );
    267269
    268     UserProc *result = _OverloadSolution( name, subs, isEnabledReturnType );
     270    const UserProc *result = _OverloadSolution( name, subs, isEnabledReturnType );
    269271
    270272    trace_for_overload( "■■■ ここまで" );
Note: See TracChangeset for help on using the changeset viewer.