From 476695748b2848b869c67aaae7bbcce625cb18af Mon Sep 17 00:00:00 2001 From: allem Date: Sat, 14 Sep 2019 00:07:12 -0400 Subject: [PATCH] code tidying --- cosets/src/util/coxeter.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cosets/src/util/coxeter.hpp b/cosets/src/util/coxeter.hpp index d8e0f4e..d9e49c8 100644 --- a/cosets/src/util/coxeter.hpp +++ b/cosets/src/util/coxeter.hpp @@ -12,7 +12,7 @@ template struct Multiplicites { std::vector mults; - explicit Multiplicites(std::vector vals) { + explicit Multiplicites(const std::vector &vals) { mults = std::vector(N * (N - 1) / 2, 2); for (const auto &mult : vals) { set(mult.a, mult.b, mult.mult); @@ -27,7 +27,7 @@ struct Multiplicites { mults[a + b] = mult; } - int get(int a, int b) const { + [[nodiscard]] int get(int a, int b) const { if (a > N or b > N) throw std::logic_error("mirror does not exist"); if (a == b) throw std::logic_error("cannot compare mirror to itself"); if (a < b) std::swap(a, b); // a is bigger