Skip to content

Commit

Permalink
Improved isAllDigits algo
Browse files Browse the repository at this point in the history
Close #4530, close #5828
  • Loading branch information
SinghRajenM authored and donho committed Jun 25, 2019
1 parent 3f114a5 commit 105dceb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions PowerEditor/src/ScitillaComponent/AutoCompletion.cpp
Expand Up @@ -45,11 +45,7 @@ static bool isAllDigits(const generic_string &str)
{
for (const auto& i : str)
{
if (i < -i || i > 255)
return false;

bool isDigit = ::isdigit(int(i)) != 0;
if (!isDigit)
if (i < 48 || i > 57)
return false;
}
return true;
Expand Down

0 comments on commit 105dceb

Please sign in to comment.