src: misc cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2022-11-09 22:15:11 +01:00
parent dadee7acfb
commit 2578102be9
2 changed files with 8 additions and 1 deletions
+3
View File
@@ -377,6 +377,9 @@ private:
namespace compile_time {
constexpr size_t string_len(const char *a) {
return *a == '\0' ? 0 : 1 + string_len(a + 1);
}
constexpr bool string_eq(const char *a, const char *b) {
return *a == *b && (*a == '\0' || string_eq(a + 1, b + 1));
}