From a3236782c9f551a49c9fb83f3e8e7753fbacd020 Mon Sep 17 00:00:00 2001 From: Daniel Kroening Date: Sun, 19 Apr 2026 19:22:51 -0700 Subject: [PATCH] move flag initialisation in smt2_convt This moves the initialisation of the flags used by smt2_convt from the constructor to the member declaration. This makes it easier to see that they are indeed initialised, and how. --- src/solvers/smt2/smt2_conv.cpp | 9 +-------- src/solvers/smt2/smt2_conv.h | 14 +++++++------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/solvers/smt2/smt2_conv.cpp b/src/solvers/smt2/smt2_conv.cpp index 9abfb51a558..52ec50d7130 100644 --- a/src/solvers/smt2/smt2_conv.cpp +++ b/src/solvers/smt2/smt2_conv.cpp @@ -63,14 +63,7 @@ smt2_convt::smt2_convt( const std::string &_logic, solvert _solver, std::ostream &_out) - : use_FPA_theory(false), - use_array_of_bool(false), - use_as_const(false), - use_check_sat_assuming(false), - use_datatypes(false), - use_lambda_for_array(false), - emit_set_logic(true), - ns(_ns), + : ns(_ns), out(_out), benchmark(_benchmark), notes(_notes), diff --git a/src/solvers/smt2/smt2_conv.h b/src/solvers/smt2/smt2_conv.h index 054428f17ee..31a392e784a 100644 --- a/src/solvers/smt2/smt2_conv.h +++ b/src/solvers/smt2/smt2_conv.h @@ -65,13 +65,13 @@ class smt2_convt : public stack_decision_proceduret ~smt2_convt() override = default; - bool use_FPA_theory; - bool use_array_of_bool; - bool use_as_const; - bool use_check_sat_assuming; - bool use_datatypes; - bool use_lambda_for_array; - bool emit_set_logic; + bool use_FPA_theory = false; + bool use_array_of_bool = false; + bool use_as_const = false; + bool use_check_sat_assuming = false; + bool use_datatypes = false; + bool use_lambda_for_array = false; + bool emit_set_logic = true; exprt handle(const exprt &expr) override; void set_to(const exprt &expr, bool value) override;