prettier printer!
This commit is contained in:
parent
c22771f587
commit
b4495026cb
2 changed files with 5 additions and 6 deletions
|
@ -35,18 +35,17 @@ const Projet &Projet::operator=(const Projet &src) {
|
|||
}
|
||||
|
||||
std::ostream &Projet::print(std::ostream &out) const {
|
||||
// Liste vide
|
||||
if (taches.empty()) {
|
||||
out << "[]";
|
||||
return out;
|
||||
}
|
||||
|
||||
out << '[';
|
||||
out << "[\n";
|
||||
for (Tache *t : taches) {
|
||||
out << *t << ", ";
|
||||
out << " " << *t << ",\n";
|
||||
}
|
||||
|
||||
// \b\b permet de retirer la dernière virgule
|
||||
out << "\b\b]";
|
||||
out << ']';
|
||||
|
||||
return out;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ std::ostream &operator<<(std::ostream &out, const Tache::Etat &data) {
|
|||
|
||||
std::ostream &operator<<(std::ostream &out, const Tache &data) {
|
||||
out << "Tâche(#" << data.unique_id << ", \"" << data.name << "\", "
|
||||
<< data.etat << ") => " << data.dependances.size() << " dépendances";
|
||||
<< data.etat << ")\t=> " << data.dependances.size() << " dépendances";
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue