From 588ec39eef280a8d7af72b01bfa9f93431afa616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Mon, 13 Sep 2021 12:15:18 +0200 Subject: [PATCH] SMTSolverChoice: Make more members const/noexcept --- libsmtutil/SolverInterface.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libsmtutil/SolverInterface.h b/libsmtutil/SolverInterface.h index 21648c245..3737013b6 100644 --- a/libsmtutil/SolverInterface.h +++ b/libsmtutil/SolverInterface.h @@ -42,11 +42,11 @@ struct SMTSolverChoice bool smtlib2 = false; bool z3 = false; - static constexpr SMTSolverChoice All() { return {true, true, true}; } - static constexpr SMTSolverChoice CVC4() { return {true, false, false}; } - static constexpr SMTSolverChoice SMTLIB2() { return {false, true, false}; } - static constexpr SMTSolverChoice Z3() { return {false, false, true}; } - static constexpr SMTSolverChoice None() { return {false, false, false}; } + static constexpr SMTSolverChoice All() noexcept { return {true, true, true}; } + static constexpr SMTSolverChoice CVC4() noexcept { return {true, false, false}; } + static constexpr SMTSolverChoice SMTLIB2() noexcept { return {false, true, false}; } + static constexpr SMTSolverChoice Z3() noexcept { return {false, false, true}; } + static constexpr SMTSolverChoice None() noexcept { return {false, false, false}; } static std::optional fromString(std::string const& _solvers) { @@ -101,9 +101,9 @@ struct SMTSolverChoice return true; } - bool none() { return !some(); } - bool some() { return cvc4 || smtlib2 || z3; } - bool all() { return cvc4 && smtlib2 && z3; } + bool none() const noexcept { return !some(); } + bool some() const noexcept { return cvc4 || smtlib2 || z3; } + bool all() const noexcept { return cvc4 && smtlib2 && z3; } }; enum class CheckResult