twacube: use default/deleted

* spot/twacube/cube.cc,
spot/twacube/cube.hh,
spot/twacube/twacube.cc,
spot/twacube/twacube.hh: Here.
This commit is contained in:
Etienne Renault 2018-11-05 16:04:30 +01:00
parent b9ac017382
commit 9f372d78de
4 changed files with 13 additions and 24 deletions

View file

@ -34,9 +34,6 @@ namespace spot
++uint_size_; ++uint_size_;
} }
cubeset::~cubeset()
{ }
cube cubeset::alloc() const cube cubeset::alloc() const
{ {
auto* res = new unsigned int[2*uint_size_]; auto* res = new unsigned int[2*uint_size_];

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2015, 2016 Laboratoire de Recherche et Developpement de // Copyright (C) 2015, 2016, 2018 Laboratoire de Recherche et Developpement de
// l'Epita (LRDE). // l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -77,14 +77,13 @@ namespace spot
size_t nb_bits_; size_t nb_bits_;
public: public:
// Some deleted constructor // Some default/deleted constructor/destructors
cubeset() = delete; cubeset() = delete;
~cubeset() = default;
/// \brief Build the cubeset manager for \a aps variables /// \brief Build the cubeset manager for \a aps variables
cubeset(int aps); cubeset(int aps);
virtual ~cubeset();
/// \brief Allocate a new cube /// \brief Allocate a new cube
cube alloc() const; cube alloc() const;

View file

@ -30,9 +30,6 @@ namespace spot
{ {
} }
cstate::~cstate()
{ }
unsigned cstate::label() unsigned cstate::label()
{ {
return id_; return id_;
@ -47,12 +44,6 @@ namespace spot
cube_(cube), acc_(acc) cube_(cube), acc_(acc)
{ } { }
transition::~transition()
{ }
transition::transition()
{ }
twacube::twacube(const std::vector<std::string> aps): twacube::twacube(const std::vector<std::string> aps):
init_(0U), aps_(aps), cubeset_(aps.size()) init_(0U), aps_(aps), cubeset_(aps.size())
{ {
@ -60,7 +51,7 @@ namespace spot
twacube::~twacube() twacube::~twacube()
{ {
spot::cubeset cs = get_cubeset(); const spot::cubeset cs = get_cubeset();
for (unsigned i = 1; i <= theg_.num_edges(); ++i) for (unsigned i = 1; i <= theg_.num_edges(); ++i)
cs.release(theg_.edge_data(i).cube_); cs.release(theg_.edge_data(i).cube_);
} }

View file

@ -33,11 +33,12 @@ namespace spot
class SPOT_API cstate class SPOT_API cstate
{ {
public: public:
cstate() {} cstate() = default;
cstate(const cstate& s) = delete; cstate(const cstate& s) = delete;
cstate(cstate&& s) noexcept; cstate(cstate&& s) noexcept;
cstate(unsigned id); cstate(unsigned id);
virtual ~cstate(); ~cstate() = default;
unsigned label(); unsigned label();
private: private:
unsigned id_; unsigned id_;
@ -47,13 +48,14 @@ namespace spot
class SPOT_API transition class SPOT_API transition
{ {
public: public:
cube cube_; transition() = default;
acc_cond::mark_t acc_;
transition();
transition(const transition& t) = delete; transition(const transition& t) = delete;
transition(transition&& t) noexcept; transition(transition&& t) noexcept;
transition(const cube& cube, acc_cond::mark_t acc); transition(const cube& cube, acc_cond::mark_t acc);
virtual ~transition(); ~transition() = default;
cube cube_;
acc_cond::mark_t acc_;
}; };
/// \brief Class for iterators over transitions /// \brief Class for iterators over transitions
@ -119,7 +121,7 @@ namespace spot
const graph_t::state_storage_t& st_; ///< The underlying states const graph_t::state_storage_t& st_; ///< The underlying states
}; };
/// \brief Class for representign /// \brief Class for representing a thread-safe twa.
class SPOT_API twacube final: public std::enable_shared_from_this<twacube> class SPOT_API twacube final: public std::enable_shared_from_this<twacube>
{ {
public: public: