Remove redundant safety logic (CID 1368511)
This commit is contained in:
parent
41a79152a9
commit
d892031f28
|
@ -1127,9 +1127,6 @@ void SymbolDatabase::createSymbolDatabaseSetScopePointers()
|
||||||
start = const_cast<Token*>(_tokenizer->list.front());
|
start = const_cast<Token*>(_tokenizer->list.front());
|
||||||
end = const_cast<Token*>(_tokenizer->list.back());
|
end = const_cast<Token*>(_tokenizer->list.back());
|
||||||
}
|
}
|
||||||
assert((start == nullptr) == (end == nullptr));
|
|
||||||
if (start == nullptr)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
start->scope(&*it);
|
start->scope(&*it);
|
||||||
end->scope(&*it);
|
end->scope(&*it);
|
||||||
|
|
|
@ -2227,7 +2227,7 @@ private:
|
||||||
|
|
||||||
check("const char* foo() {\n"
|
check("const char* foo() {\n"
|
||||||
" static std::string text;\n"
|
" static std::string text;\n"
|
||||||
" text = \"hello world\n\";\n"
|
" text = \"hello world\\n\";\n"
|
||||||
" return text.c_str();\n"
|
" return text.c_str();\n"
|
||||||
"}");
|
"}");
|
||||||
ASSERT_EQUALS("", errout.str()); // #3427
|
ASSERT_EQUALS("", errout.str()); // #3427
|
||||||
|
|
Loading…
Reference in New Issue