This commit is contained in:
Mylloon 2023-10-22 01:48:19 +02:00
parent 6d3861b718
commit 43517e33ec
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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) {