Commit 240ef8af authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

[CLANG-TIDY] readability-static-accessed-through-instance

parent 128148a7
......@@ -39,7 +39,8 @@ readability-deleted-default,
readability-misleading-indentation,
readability-misplaced-array-index,
readability-redundant-control-flow,
readability-redundant-smartptr-get
readability-redundant-smartptr-get,
readability-static-accessed-through-instance
'
WarningsAsErrors: '*'
......
......@@ -271,16 +271,16 @@ void Config::parseFromFile( const char* filename, Block& block, unsigned int lev
else if( std::getline( input, value, ';' ) && !input.eof() )
{
input.ignore( 1 );
while( (value.find("$(") != value.npos) && (value.find(')') != value.npos) ) {
while( (value.find("$(") != std::string::npos) && (value.find(')') != std::string::npos) ) {
size_t s = value.find("$("); size_t e = value.find(')');
ValueReplacementMap::iterator mkey = valueReplacements_.find( value.substr( s+2, e-s+1-3 ) );
if(mkey != valueReplacements_.end()) {
value.replace( s,e-s+1, mkey->second );
}
else {
if(e!=value.npos)
if(e!=std::string::npos)
value.erase(e,1);
if(s!=value.npos)
if(s!=std::string::npos)
value.erase(s,2);
}
}
......@@ -404,16 +404,16 @@ void Config::extractBlock( const char* filename, std::stringstream& input, Block
else if( std::getline( input, value, ';' ) && !input.eof() )
{
input.ignore( 1 );
while( (value.find("$(") != value.npos) && (value.find(')') != value.npos) ) {
while( (value.find("$(") != std::string::npos) && (value.find(')') != std::string::npos) ) {
size_t s = value.find("$("); size_t e = value.find(')');
ValueReplacementMap::iterator mkey = valueReplacements_.find( value.substr( s+2, e-s+1-3 ) );
if(mkey != valueReplacements_.end()) {
value.replace( s,e-s+1, mkey->second );
}
else {
if(e!=value.npos)
if(e!=std::string::npos)
value.erase(e,1);
if(s!=value.npos)
if(s!=std::string::npos)
value.erase(s,2);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment