fix: redundant variable

This commit is contained in:
Lam Haoyin 2022-04-07 02:02:04 +08:00
parent e81c48f739
commit 56bace58b7
No known key found for this signature in database
GPG Key ID: 8C089CB1A2B7544F
1 changed files with 1 additions and 2 deletions

View File

@ -13,8 +13,7 @@ public:
return true;
};
std::size_t pos = 0;
for (std::size_t nextPos = goal.find(ch, pos); nextPos != std::string::npos; nextPos = goal.find(ch, pos = nextPos + 1))
for (std::size_t nextPos = goal.find(ch, 0); nextPos != std::string::npos; nextPos = goal.find(ch, nextPos + 1))
if (verify(nextPos))
return true;
return false;