From b7c8125094511a8adde2aa2100662e232705d927 Mon Sep 17 00:00:00 2001 From: Brett Date: Sun, 8 Dec 2024 16:37:38 -0500 Subject: [PATCH] day8 --- CMakeLists.txt | 2 +- src/day8.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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;