This commit is contained in:
Mylloon 2023-10-28 02:35:22 +02:00
parent 7b2726c5d2
commit 510b8680e8
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 5 additions and 3 deletions

View file

@ -46,7 +46,7 @@ protected:
Tache *contains(const std::string name) const;
// Donne une version du vecteur de tâches non modifiable
const std::vector<Tache *> consult_tasks() const;
const std::vector<const Tache *> consult_tasks() const;
// Corrige les éventuelles anomalies du vector de tâches
void topologicalSort();

View file

@ -7,7 +7,7 @@ class RunProjet final : public ProtoProjet {
friend std::ostream &operator<<(std::ostream &, const RunProjet &);
public:
RunProjet() = delete; // constructor
RunProjet() = delete; // remove default constructor
RunProjet(ProtoProjet &); // constructor
virtual ~RunProjet(); // destructor

View file

@ -86,7 +86,9 @@ Tache *Projet::contains(const std::string name) const {
return nullptr;
}
const std::vector<Tache *> Projet::consult_tasks() const { return taches; }
const std::vector<const Tache *> Projet::consult_tasks() const {
return std::vector<const Tache *>(taches.begin(), taches.end());
}
void Projet::topologicalSort() {
// Construction de la pile