diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ddf124..90ebc32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(Advent-Of-Code-2024 VERSION 0.0.7) +project(Advent-Of-Code-2024 VERSION 0.0.8) option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF) option(ENABLE_UBSAN "Enable the ub sanitizer" OFF) diff --git a/src/day8.cpp b/src/day8.cpp index 68e3187..3260202 100644 --- a/src/day8.cpp +++ b/src/day8.cpp @@ -86,9 +86,8 @@ namespace day8 { if (i == x && y == j) continue; - const auto current = get(i, j); - if (compare == current) + if (compare == get(i, j)) { const int dist_x = i - x; const int dist_y = j - y;