Update some 2015 sources to .clang-tidy

This commit is contained in:
2021-12-02 19:57:58 +00:00
parent 7ab7ecb00a
commit 9ecc3ff53d
27 changed files with 305 additions and 336 deletions

View File

@@ -1,13 +1,9 @@
#include <cassert>
#include <functional>
#include <iostream>
#include <map>
#include <regex>
#include <set>
#include <string>
#include <variant>
int parse_numbers(std::string const& s)
auto parse_numbers(std::string const& s) -> int
{
static const std::regex re("-?\\d+");
std::string left = s;
@@ -21,7 +17,7 @@ int parse_numbers(std::string const& s)
return acc;
}
int main(int argc, char** argv)
auto main() -> int
{
int acc = 0;
for (std::string line; std::getline(std::cin, line);) {