@@ -9,12 +9,9 @@
namespace Core {
template<typename T>
constexpr int stringLength(const T* c) {
- int i = 0;
- while(*c != '\0') {
- c++;
- i++;
- }
- return i;
+ const T* i = c + 1;
+ while(*(c++) != '\0') {}
+ return static_cast<int>(c - i);
}
Error readUnicode(c32& u, const char*& s);