MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / parse_reasons_json

Function parse_reasons_json

cp-profiler/src/cpprofiler/solver_data.cpp:11–27  ·  view source on GitHub ↗

convert json array to std::vector

Source from the content-addressed store, hash-verified

9
10/// convert json array to std::vector
11static 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
30static std::vector<SolverID> parse_nogoods_json(QJsonValue &json_arr)

Callers 1

processInfoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected