From 0159eec6a09e841fbfeaf61ec1fef296a3ce7d39 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sun, 4 Dec 2022 19:15:05 +0100 Subject: [PATCH] cleanup --- d04.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/d04.cc b/d04.cc index 059aa9c..ebf80f3 100644 --- a/d04.cc +++ b/d04.cc @@ -9,13 +9,12 @@ public: unsigned min; unsigned max; - bool contains(const Range &in) { + bool contains(const Range &in) const { return min <= in.min && max >= in.max; } - bool overlaps(const Range &in) { - return (min <= in.min && in.min <= max) - || (in.min <= min && min <= in.max); + bool overlaps(const Range &in) const { + return min <= in.max && in.min <= max; } };