]> git.lyx.org Git - features.git/blobdiff - src/Author.cpp
Unify naming of menu items
[features.git] / src / Author.cpp
index 9a2dc1ea432fca51a6241f633540614a8c2fb063..b4cf9fd97baa3c87a7cebddc19ff3ac00bf733ff 100644 (file)
@@ -31,8 +31,8 @@ static int computeHash(docstring const & name,
        string const full_author_string = to_utf8(name + email);
        // Bernstein's hash function
        unsigned int hash = 5381;
-       for (unsigned int i = 0; i < full_author_string.length(); ++i)
-               hash = ((hash << 5) + hash) + (unsigned int)(full_author_string[i]);
+       for (char c : full_author_string)
+               hash = ((hash << 5) + hash) + (unsigned int)c;
        return int(hash);
 }