Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cpp/test/phonenumbers/phonenumbermatcher_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ class PhoneNumberMatcherTest : public testing::Test {
void EnsureTermination(const string& text, const string& default_country,
PhoneNumberMatcher::Leniency leniency) {
for (size_t index = 0; index <= text.length(); ++index) {
string sub = text.substr(index);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, not quite sure what this test tries to achieve. This line is the only use of index, so not sure what the point is of running this test text.length() times. Maybe the code below wanted to use sub somewhere? Do you know what this attempts to achieve?

As-is, this PR fixes the warning and keeps current behavior.

// Iterates over all matches.
PhoneNumberMatcher matcher(phone_util_, text, default_country, leniency,
1000000 /* max_tries */);
Expand Down
Loading