diff options
| author | Orfeas <38209077+0xfea5@users.noreply.github.com> | 2025-12-05 17:18:26 +0200 |
|---|---|---|
| committer | Orfeas <38209077+0xfea5@users.noreply.github.com> | 2025-12-05 17:18:26 +0200 |
| commit | 3688a3997fdc7eb468fdd53369d6583f18b4aaea (patch) | |
| tree | 3e9904feb7177c4205d6ddfd0e513e3e8382e1a4 /skel/solution.cpp | |
| parent | day02 (diff) | |
| download | aoc25-3688a3997fdc7eb468fdd53369d6583f18b4aaea.tar.gz aoc25-3688a3997fdc7eb468fdd53369d6583f18b4aaea.zip | |
skel/solution.cpp: ignore empty lines
Diffstat (limited to 'skel/solution.cpp')
| -rw-r--r-- | skel/solution.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/skel/solution.cpp b/skel/solution.cpp index 4279dec..4f2b128 100644 --- a/skel/solution.cpp +++ b/skel/solution.cpp | |||
| @@ -9,7 +9,8 @@ auto parse_input(std::istream& is) { | |||
| 9 | std::istreambuf_iterator<char>() | 9 | std::istreambuf_iterator<char>() |
| 10 | }; | 10 | }; |
| 11 | 11 | ||
| 12 | auto const lines = views::split(input, '\n'); | 12 | auto const lines = views::split(input, '\n') |
| 13 | | views::filter([](auto&& line) { return not line.empty(); }); | ||
| 13 | // Parse input | 14 | // Parse input |
| 14 | return lines; | 15 | return lines; |
| 15 | } | 16 | } |
