Fix refactor of static aggregate method

This commit is contained in:
2024-05-17 23:38:21 +02:00
parent 49a36904dc
commit c165a4bdda
3 changed files with 5 additions and 6 deletions

View File

@@ -40,11 +40,11 @@ namespace platform {
}
compute_accuracy_value();
}
static Score Scores::create_aggregate(json& data, std::string key)
Scores Scores::create_aggregate(json& data, std::string key)
{
auto scores = Scores(result[key][0]);
for (int i = 1; i < result[key].size(); i++) {
auto score = Scores(result[key][i]);
auto scores = Scores(data[key][0]);
for (int i = 1; i < data[key].size(); i++) {
auto score = Scores(data[key][i]);
scores.aggregate(score);
}
return scores;