twacube: atomic propositions are now passed by copy

Passing atomic propositions by reference allows to
save very little memory so it doesn't worth complexifying
memory management.

* spot/twacube/twacube.cc, spot/twacube/twacube.hh: here.
This commit is contained in:
Etienne Renault 2016-04-20 14:05:04 +02:00
parent 6d3154be94
commit e11f24dbc1
2 changed files with 6 additions and 6 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2015 Laboratoire de Recherche et Developpement de // Copyright (C) 2015, 2016 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.
@ -52,7 +52,7 @@ namespace spot
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())
{ {
} }
@ -74,7 +74,7 @@ namespace spot
return acc_; return acc_;
} }
const std::vector<std::string>& twacube::get_ap() std::vector<std::string> twacube::get_ap()
{ {
return aps_; return aps_;
} }

View file

@ -105,11 +105,11 @@ namespace spot
{ {
public: public:
twacube() = delete; twacube() = delete;
twacube(const std::vector<std::string>& aps); twacube(const std::vector<std::string> aps);
virtual ~twacube(); virtual ~twacube();
const acc_cond& acc() const; const acc_cond& acc() const;
acc_cond& acc(); acc_cond& acc();
const std::vector<std::string>& get_ap(); std::vector<std::string> get_ap();
unsigned int new_state(); unsigned int new_state();
void set_initial(unsigned int init); void set_initial(unsigned int init);
unsigned int get_initial(); unsigned int get_initial();
@ -146,7 +146,7 @@ namespace spot
private: private:
unsigned int init_; unsigned int init_;
acc_cond acc_; acc_cond acc_;
const std::vector<std::string>& aps_; const std::vector<std::string> aps_;
graph_t theg_; graph_t theg_;
cubeset cubeset_; cubeset cubeset_;
}; };