convert json array to std::vector
| 9 | |
| 10 | /// convert json array to std::vector |
| 11 | static std::vector<int> parse_reasons_json(QJsonValue &json_arr) |
| 12 | { |
| 13 | std::vector<int> res; |
| 14 | |
| 15 | auto arr = json_arr.toArray(); |
| 16 | |
| 17 | for (auto el : arr) |
| 18 | { |
| 19 | |
| 20 | if (el.isDouble()) |
| 21 | { |
| 22 | res.push_back(el.toInt()); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | return res; |
| 27 | } |
| 28 | |
| 29 | /// convert json array to std::vector |
| 30 | static std::vector<SolverID> parse_nogoods_json(QJsonValue &json_arr) |