Skip to content

Commit

Permalink
Change to string::npos for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
aarikpokras authored Nov 24, 2024
1 parent d8c6117 commit 28d2218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ size_t find_a(string str) {
size_t index = str.find(",");
amt++;
str.erase(0, index+1);
if (index > str.size()) { // Change to string::npos for compat
amt++; // If no match (returns very large number), add to amt and return
if (index == string::npos) {
amt++;
return amt;
}
}
Expand Down

0 comments on commit 28d2218

Please sign in to comment.