summaryrefslogtreecommitdiffstats
path: root/raul/Symbol.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-16 22:11:37 +0200
committerDavid Robillard <d@drobilla.net>2018-09-16 22:11:37 +0200
commit0c6bb92f3f59b6b86f3b7b56224677e79b2e6900 (patch)
tree40e3173eec8b493f22152372cc00782f2a076f92 /raul/Symbol.hpp
parent07396e8d23bb8724c5960b57aca33e08a97f4e52 (diff)
downloadraul-0c6bb92f3f59b6b86f3b7b56224677e79b2e6900.tar.gz
raul-0c6bb92f3f59b6b86f3b7b56224677e79b2e6900.tar.bz2
raul-0c6bb92f3f59b6b86f3b7b56224677e79b2e6900.zip
Lint with clang-tidy
Diffstat (limited to 'raul/Symbol.hpp')
-rw-r--r--raul/Symbol.hpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/raul/Symbol.hpp b/raul/Symbol.hpp
index 1189b7b..70062be 100644
--- a/raul/Symbol.hpp
+++ b/raul/Symbol.hpp
@@ -73,9 +73,7 @@ public:
* Note this is faster than constructing a Symbol from another Symbol's
* string since validation is unnecessary.
*/
- Symbol(const Symbol& symbol)
- : std::basic_string<char>(symbol)
- {}
+ Symbol(const Symbol& symbol) = default;
/** Return true iff `c` is a valid Symbol start character. */
static inline bool is_valid_start_char(char c) {
@@ -93,8 +91,8 @@ public:
return false; // Must start with a letter or underscore
}
- for (size_t i = 0; i < str.length(); ++i) {
- if (!is_valid_char(str[i])) {
+ for (auto c : str) {
+ if (!is_valid_char(c)) {
return false; // All characters must be _, a-z, A-Z, 0-9
}
}