Simplify the code (variable bValid is not really interesting)

llvm-svn: 211452
This commit is contained in:
Sylvestre Ledru 2014-06-21 23:48:45 +00:00
parent 88e68cdc94
commit 002c25602c
1 changed files with 4 additions and 7 deletions

View File

@ -158,19 +158,16 @@ bool CMICmdFactory::HaveAlready( const CMIUtilString & vMiCmd ) const
//--
bool CMICmdFactory::IsValid( const CMIUtilString & vMiCmd ) const
{
bool bValid = true;
if( vMiCmd.empty() )
{
bValid = false;
return false;
}
const MIint nPos = vMiCmd.find( " " );
if( nPos != (MIint) std::string::npos )
bValid = false;
return bValid;
return false;
return true;
}
//++ ------------------------------------------------------------------------------------
@ -226,4 +223,4 @@ bool CMICmdFactory::CmdCreate( const CMIUtilString & vMiCmd, const SMICmdData &
vpNewCmd = pCmd;
return bOk;
}
}