Skip to content

Commit 3c73d71

Browse files
committed
constexpr is_digit alternative to std::isdigit
1 parent 5551b09 commit 3c73d71

File tree

1 file changed

+5
-2
lines changed
  • engine/core/jlECS/public/jlECS

1 file changed

+5
-2
lines changed

engine/core/jlECS/public/jlECS/jlECS.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#include <cassert>
2121
#include <climits>
22-
#include <cctype>
2322
#include <algorithm>
2423
#include <memory>
2524
#include <vector>
@@ -63,8 +62,12 @@ getCleanTypeName(const char *name)
6362

6463
const char *result = name;
6564

65+
const bool is_digit = [](char c) {
66+
return c >= '0' && c <= '9';
67+
};
68+
6669
// Skip all leading digits
67-
while (std::isdigit(*result)) {
70+
while (is_digit(*result)) {
6871
++result;
6972
}
7073

0 commit comments

Comments
 (0)