blob: a5d2e691e683e7536a0a506687057f49bc49568d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include "Competitor.h"
bool Competitor::setCompetitor(const QJsonObject &competitor) {
if (!competitor.contains("code")
|| !competitor.contains("name")
|| !competitor.contains("noc")) {
throw invalid_argument("Not a competitor object.");
}
this->code = competitor["code"].toString();
this->name = competitor["name"].toString();
this->noc = competitor["noc"].toString();
return true;
}
|