From 2e2a95faefb18902a8d7f023205c6802fc2a6618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Wed, 25 Dec 2024 21:43:20 +0100 Subject: [PATCH] Add const to GuardGallivant.getStartDirectionIndex() --- include/aoc/GuardGallivant.hpp | 2 +- src/GuardGallivant.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/aoc/GuardGallivant.hpp b/include/aoc/GuardGallivant.hpp index ccf3b8d..58d91c1 100644 --- a/include/aoc/GuardGallivant.hpp +++ b/include/aoc/GuardGallivant.hpp @@ -29,7 +29,7 @@ class GuardGallivant Point2 start_{}; void visitPosition(const Point2& current); size_t turnDirection(const size_t current) const; - size_t getStartDirectionIndex() const; + const size_t getStartDirectionIndex() const; const char getStartChar() const; const char getVisitedChar() const; const char getObstructionChar() const; diff --git a/src/GuardGallivant.cpp b/src/GuardGallivant.cpp index c6c1a7e..b14cfc8 100644 --- a/src/GuardGallivant.cpp +++ b/src/GuardGallivant.cpp @@ -70,7 +70,7 @@ size_t GuardGallivant::turnDirection(const size_t current) const return current == 0 ? 3 : current - 1; } -size_t GuardGallivant::getStartDirectionIndex() const +const size_t GuardGallivant::getStartDirectionIndex() const { return 2; }