refactor
This commit is contained in:
parent
6d3861b718
commit
43517e33ec
1 changed files with 8 additions and 9 deletions
|
@ -8,6 +8,14 @@ Tache::Tache(const int duree)
|
||||||
|
|
||||||
Tache::~Tache() {}
|
Tache::~Tache() {}
|
||||||
|
|
||||||
|
void Tache::_copy(const Tache &src) {
|
||||||
|
// Copie des dépendances
|
||||||
|
dependances.reserve(src.dependances.size());
|
||||||
|
for (Tache *t : src.dependances) {
|
||||||
|
dependances.push_back(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Tache::Tache(const Tache &src)
|
Tache::Tache(const Tache &src)
|
||||||
: unique_id(++counter_id), duree_total(src.duree_total), etat(src.etat) {
|
: unique_id(++counter_id), duree_total(src.duree_total), etat(src.etat) {
|
||||||
_copy(src);
|
_copy(src);
|
||||||
|
@ -42,15 +50,6 @@ std::ostream &operator<<(std::ostream &out, const Tache &data) {
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tache::_copy(const Tache &src) {
|
|
||||||
// Copie des dépendances
|
|
||||||
dependances.reserve(src.dependances.size());
|
|
||||||
for (Tache *t : src.dependances) {
|
|
||||||
dependances.push_back(t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
bool Tache::realise() {
|
bool Tache::realise() {
|
||||||
for (const Tache *const it : dependances) {
|
for (const Tache *const it : dependances) {
|
||||||
if (it->etat != Realisee) {
|
if (it->etat != Realisee) {
|
||||||
|
|
Reference in a new issue