diff options
Diffstat (limited to 'src/2016/day1/aoc.cpp')
-rw-r--r-- | src/2016/day1/aoc.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/2016/day1/aoc.cpp b/src/2016/day1/aoc.cpp index 8f79ece..114c290 100644 --- a/src/2016/day1/aoc.cpp +++ b/src/2016/day1/aoc.cpp @@ -6,8 +6,6 @@ instruction parse_day1(const char** pp) { instruction i; const char* p = *pp; i.direction = (*p++) == 'R' ? instruction::right : instruction::left; - i.distance = 0; - while (*p >= '0' && *p <= '9') { i.distance = i.distance * 10 + *p - '0'; p++; @@ -22,7 +20,7 @@ std::pair<int, int> day1(line_view file) { std::vector<instruction> is; bool found = false; - position first; + position first{position::north, 0, 0}; const char* p1 = file.line; const char* p2 = file.line + file.length; |