summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/.clang-tidy1
-rw-r--r--include/raul/Symbol.hpp9
-rw-r--r--test/.clang-tidy1
3 files changed, 2 insertions, 9 deletions
diff --git a/include/.clang-tidy b/include/.clang-tidy
index 6bc88d2..05349dd 100644
--- a/include/.clang-tidy
+++ b/include/.clang-tidy
@@ -20,7 +20,6 @@ Checks: >
-llvmlibc-*,
-modernize-use-trailing-return-type,
-readability-implicit-bool-conversion,
- -readability-use-anyofallof,
CheckOptions:
- key: modernize-use-override.AllowOverrideAndFinal
value: 'true'
diff --git a/include/raul/Symbol.hpp b/include/raul/Symbol.hpp
index 30917b5..5794440 100644
--- a/include/raul/Symbol.hpp
+++ b/include/raul/Symbol.hpp
@@ -18,6 +18,7 @@
#include "raul/Exception.hpp"
+#include <algorithm>
#include <cstddef>
#include <string>
@@ -99,13 +100,7 @@ public:
return false; // Must start with a letter or underscore
}
- for (auto c : str) {
- if (!is_valid_char(c)) {
- return false; // All characters must be _, a-z, A-Z, 0-9
- }
- }
-
- return true;
+ return std::all_of(str.begin(), str.end(), is_valid_char);
}
/** Convert a string to a valid symbol.
diff --git a/test/.clang-tidy b/test/.clang-tidy
index 1ee750a..9d34765 100644
--- a/test/.clang-tidy
+++ b/test/.clang-tidy
@@ -25,7 +25,6 @@ Checks: >
-modernize-make-unique,
-modernize-use-trailing-return-type,
-readability-implicit-bool-conversion,
- -readability-use-anyofallof,
CheckOptions:
- key: modernize-use-override.AllowOverrideAndFinal
value: 'true'