This commit is contained in:
Mylloon 2023-10-27 19:27:53 +02:00
parent 9f66c43e1e
commit 7cf3097046
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 10 additions and 11 deletions

View file

@ -17,9 +17,9 @@ const Projet &Projet::operator=(const Projet &src) {
}
std::pair<int, int> Projet::pick_two_random_tasks() {
int size = this->taches.size();
int rand1 = rand() % size;
int rand2 = rand() % size;
size_t size = this->taches.size();
size_t rand1 = static_cast<size_t>(rand()) % size;
size_t rand2 = static_cast<size_t>(rand()) % size;
if (this->taches[rand1].first->depends_from(*this->taches[rand2].first))
pick_two_random_tasks();

View file

@ -10,8 +10,7 @@ ProtoProjet::ProtoProjet(VecTaches t, Tache debut, Tache fin) : Projet(t) {
ProtoProjet::~ProtoProjet() {}
ProtoProjet::ProtoProjet(const ProtoProjet &src)
: Projet(VecTaches() /* TODO*/) {}
ProtoProjet::ProtoProjet(const ProtoProjet &) : Projet(VecTaches() /* TODO*/) {}
const ProtoProjet &ProtoProjet::operator=(const ProtoProjet &src) {
if (this == &src) {
@ -21,12 +20,12 @@ const ProtoProjet &ProtoProjet::operator=(const ProtoProjet &src) {
return *this;
}
void ProtoProjet::cleanMarks() {
for (auto t : this->getTaches()) {
t.second = false;
}
void ProtoProjet::cleanMarks(){
/* for (auto t : this->getTaches()) {
t.second = false;
} */
};
bool ProtoProjet::ajoute(std::string nom, int duree) {
bool ProtoProjet::ajoute(std::string /* nom */, int /* duree */) {
return false; /* TODO */
}

View file

@ -4,7 +4,7 @@ RunProjet::RunProjet() { std::cout << "Hello, runProject!\n"; }
RunProjet::~RunProjet() {}
RunProjet::RunProjet(const RunProjet &) {}
RunProjet::RunProjet(const RunProjet &) : ProtoProjet() {}
const RunProjet &RunProjet::operator=(const RunProjet &src) {
if (this == &src) {