From 99bfa2520fb9b7215cd1aba92fc48fa6cfed3b92 Mon Sep 17 00:00:00 2001 From: Orfeas <38209077+0xfea5@users.noreply.github.com> Date: Thu, 4 Dec 2025 02:17:48 +0200 Subject: .editorconfig: increase indentation --- .editorconfig | 2 +- day01/solution.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index 3e36df7..a1857f9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,7 +6,7 @@ insert_final_newline = true charset = utf-8 trim_trailing_whitespace = true indent_style = space -indent_size = 2 +indent_size = 4 max_line_length = 80 [*.md] diff --git a/day01/solution.cpp b/day01/solution.cpp index 9fb9ec1..33b7550 100644 --- a/day01/solution.cpp +++ b/day01/solution.cpp @@ -13,9 +13,7 @@ auto parse_input(std::istream& is) { std::vector document; for (auto const line : lines) { char direction = line[0]; - std::string out; - ranges::copy(line | views::drop(1), std::back_inserter(out)); - int length = std::stoi(out); + int length = std::stoi(std::ranges::to(line | views::drop(1))); document.push_back(direction == 'R' ? length : -length); } return document; @@ -54,7 +52,6 @@ void part2(auto const& input) { } dial %= DIAL_MAX; old_dial = dial; - std::cerr << answer << ' ' << dial << '\n'; } std::println("{}", answer); } -- cgit v1.2.3