Modernize: Use range-based for loops for readability (#762)

Also run clang-format on these files as requested
This commit is contained in:
Andy Maloney
2019-10-05 15:20:17 -04:00
committed by Jesse Beder
parent 21d75fa4cd
commit b650bc8287
7 changed files with 37 additions and 37 deletions

View File

@@ -53,8 +53,8 @@ struct Token {
friend std::ostream& operator<<(std::ostream& out, const Token& token) {
out << TokenNames[token.type] << std::string(": ") << token.value;
for (std::size_t i = 0; i < token.params.size(); i++)
out << std::string(" ") << token.params[i];
for (const std::string& param : token.params)
out << std::string(" ") << param;
return out;
}