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

@@ -21,8 +21,7 @@ struct Graph
std::smatch m;
if (!std::regex_search(s, m, re)) {
std::cout << "Failed to match: " << s << "\n";
assert(false);
return;
abort();
}
auto n1 = m.str(1);
auto n2 = m.str(2);
@@ -37,7 +36,7 @@ struct Graph
std::cout << n1 << " <-> " << n2 << " weight: " << w << "\n";
}
Weight solve_tsp() const
[[nodiscard]] auto solve_tsp() const -> Weight
{
Weight min_weight = ~0U;
std::vector<Node> nodes(nodes_.begin(), nodes_.end());
@@ -67,7 +66,7 @@ struct Graph
Edges weights_;
};
int main(int argc, char** argv)
auto main() -> int
{
Graph g;