Use properly-sized loop variables or convert to ranged-for (bugprone-too-small-loop-variable)

This commit is contained in:
Tim Wojtulewicz 2020-02-12 14:56:56 -08:00
parent 94c4c85e82
commit 1248411a2f
22 changed files with 89 additions and 95 deletions

View file

@ -301,7 +301,7 @@ int String::FindSubstring(const String* s) const
String::Vec* String::Split(const String::IdxVec& indices) const
{
unsigned int i;
size_t i;
if ( indices.empty() )
return nullptr;
@ -482,8 +482,8 @@ String* concatenate(String::Vec& v)
void delete_strings(std::vector<const String*>& v)
{
for ( unsigned int i = 0; i < v.size(); ++i )
delete v[i];
for ( auto& elem : v )
delete elem;
v.clear();
}