diff --git a/bin/common_trans.cc b/bin/common_trans.cc index 64c9230c2..3c71ab719 100644 --- a/bin/common_trans.cc +++ b/bin/common_trans.cc @@ -133,10 +133,22 @@ translator_spec::translator_spec(const char* spec) translator_spec::translator_spec(const translator_spec& other) : spec(other.spec), cmd(other.cmd), name(other.name) { - if (name != spec) - name = strdup(name); if (cmd != spec) cmd = strdup(cmd); + if (name != spec) + name = strdup(name); +} + +translator_spec& translator_spec::operator=(const translator_spec& other) +{ + spec = other.spec; + cmd = other.cmd; + if (cmd != spec) + cmd = strdup(cmd); + name = other.name; + if (name != spec) + name = strdup(name); + return *this; } translator_spec::~translator_spec() diff --git a/bin/common_trans.hh b/bin/common_trans.hh index f93304ffe..776ea2730 100644 --- a/bin/common_trans.hh +++ b/bin/common_trans.hh @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2015 Laboratoire de Recherche et Développement de +// Copyright (C) 2015, 2016 Laboratoire de Recherche et Développement de // l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -45,6 +45,7 @@ struct translator_spec translator_spec(const char* spec); translator_spec(const translator_spec& other); + translator_spec& operator=(const translator_spec& other); ~translator_spec(); }; diff --git a/spot/ta/taproduct.cc b/spot/ta/taproduct.cc index 63748e3a6..a9ee2b7a3 100644 --- a/spot/ta/taproduct.cc +++ b/spot/ta/taproduct.cc @@ -28,12 +28,6 @@ namespace spot //////////////////////////////////////////////////////////// // state_ta_product - state_ta_product::state_ta_product(const state_ta_product& o) : - state(), ta_state_(o.get_ta_state()), kripke_state_( - o.get_kripke_state()->clone()) - { - } - state_ta_product::~state_ta_product() { //see ta_product::free_state() method @@ -61,7 +55,7 @@ namespace spot state_ta_product* state_ta_product::clone() const { - return new state_ta_product(*this); + return new state_ta_product(ta_state_, kripke_state_); } //////////////////////////////////////////////////////////// diff --git a/spot/ta/taproduct.hh b/spot/ta/taproduct.hh index 32286c63d..051e9bc79 100644 --- a/spot/ta/taproduct.hh +++ b/spot/ta/taproduct.hh @@ -41,8 +41,7 @@ namespace spot { } - /// Copy constructor - state_ta_product(const state_ta_product& o); + state_ta_product(const state_ta_product& o) = delete; virtual ~state_ta_product(); diff --git a/spot/twa/acc.hh b/spot/twa/acc.hh index 256132ece..9f3b32841 100644 --- a/spot/twa/acc.hh +++ b/spot/twa/acc.hh @@ -950,6 +950,15 @@ namespace spot { } + acc_cond& operator=(const acc_cond& o) + { + num_ = o.num_; + all_ = o.all_; + code_ = o.code_; + uses_fin_acceptance_ = o.uses_fin_acceptance_; + return *this; + } + ~acc_cond() { } diff --git a/spot/twaalgos/ltl2tgba_fm.cc b/spot/twaalgos/ltl2tgba_fm.cc index 93af563d0..97318e200 100644 --- a/spot/twaalgos/ltl2tgba_fm.cc +++ b/spot/twaalgos/ltl2tgba_fm.cc @@ -1856,11 +1856,6 @@ namespace spot { } - transition(const transition& other) - : dest(other.dest), prom(other.prom), cond(other.cond) - { - } - bool operator<(const transition& other) const { if (dest < other.dest)