Commit 046577f8 authored by Etienne Renault's avatar Etienne Renault
Browse files

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.
parent c658d540
// -*- 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 ...@@ -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 ...@@ -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_;
} }
......
...@@ -105,11 +105,11 @@ namespace spot ...@@ -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 ...@@ -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_;
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment