Changeset 353 in dev for trunk/abdev/BasicCompiler_Common/ParamImpl.cpp
- Timestamp:
- Oct 21, 2007, 3:37:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/ParamImpl.cpp
r319 r353 204 204 205 205 const UserProc *ParamImpl::_OverloadSolution( const char *name, std::vector<const UserProc *> &subs, bool isEnabledReturnType ){ 206 int sw=0; 207 const UserProc *pUserProc; 208 pUserProc=0; 206 const UserProc *pUserProc = NULL; 209 207 210 208 for( int level=OVERLOAD_MIN_LEVEL; level<=OVERLOAD_MAX_LEVEL; level++ ){ … … 213 211 214 212 if(EvaluateOverloadScore( level, pTempUserProc->Params(), isEnabledReturnType?pTempUserProc->ReturnType():Type() )){ 215 trace_for_overload( "レベル" << level << 216 217 if( sw){213 trace_for_overload( "レベル" << level << " ○適合..." << pTempUserProc->_paramStr ); 214 215 if( pUserProc ){ 218 216 if( isEnabledReturnType ){ 219 217 SetError(52,name,cp); 220 221 return 0;222 218 } 223 219 else{ … … 229 225 } 230 226 } 231 sw=1;232 227 233 228 pUserProc = pTempUserProc; … … 235 230 else 236 231 { 237 trace_for_overload( "レベル" << level << 238 } 239 } 240 241 if( sw) break;242 } 243 244 if( !sw){232 trace_for_overload( "レベル" << level << " ×不適合..." << pTempUserProc->_paramStr ); 233 } 234 } 235 236 if( pUserProc ) break; 237 } 238 239 if( !pUserProc ){ 245 240 BOOST_FOREACH( const UserProc *pTempUserProc, subs ){ 246 241 247 242 //エラーチェック 248 243 if(pTempUserProc->Params().size()==this->ParmsNum){ 249 if(sw){ 250 sw=0; 251 break; 252 } 253 sw=1; 244 if( pUserProc ){ 245 SetError(52,name,cp); 246 } 254 247 255 248 pUserProc=pTempUserProc; … … 258 251 } 259 252 260 if(!sw){ 261 SetError(52,name,cp); 262 263 return 0; 264 } 265 253 if( !pUserProc ) 254 { 255 SetError(); 256 } 266 257 267 258 return pUserProc;
Note: See TracChangeset
for help on using the changeset viewer.