@@ -41,6 +41,7 @@ using std::vector;
4141using std::map;
4242using std::pair;
4343using namespace CMSat ;
44+ using std::unique_ptr;
4445
4546namespace AppMCInt {
4647
@@ -93,23 +94,23 @@ struct SparseData {
9394
9495class Counter {
9596public:
96- Counter (Config& _conf, const std:: unique_ptr<FieldGen>& _fg) : fg(_fg->dup ()), conf(_conf) {}
97+ Counter (Config& _conf, const unique_ptr<FieldGen>& _fg) : fg(_fg->dup ()), conf(_conf) {}
9798 ApproxMC::SolCount solve ();
9899 string gen_rnd_bits (const uint32_t size,
99100 const uint32_t numhashes, SparseData& sparse_data);
100101 string binary (const uint32_t x, const uint32_t length);
101102 bool find_one_solution ();
102103 bool gen_rhs ();
103104 uint32_t threshold_appmcgen;
104- SATSolver* solver = nullptr ;
105+ unique_ptr< SATSolver> solver = nullptr ;
105106 ApproxMC::SolCount calc_est_count ();
106107 const Constants constants;
107108 bool solver_add_clause (const vector<Lit>& cl);
108109 bool solver_add_xor_clause (const vector<uint32_t >& vars, const bool rhs);
109110 bool solver_add_xor_clause (const vector<Lit>& lits, const bool rhs);
110111
111112private:
112- std:: unique_ptr<FieldGen> fg;
113+ unique_ptr<FieldGen> fg;
113114 Config& conf;
114115 ApproxMC::SolCount count ();
115116 void add_appmc_options ();
0 commit comments