File tree Expand file tree Collapse file tree
lib/3rd_party_adapters/nlohmann Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,22 +36,17 @@ std::string toJsonString<task_tracker_systems::TaskObject>(const task_tracker_sy
3636 return jsonObject.dump (defaultJsonIndent);
3737}
3838
39- void to_json (nlohmann::json &jsonObject, const device::TaskCollection::const_iterator &iterator )
39+ void to_json (nlohmann::json &jsonObject, const device::TaskCollection::value_type &object )
4040{
41- jsonObject[" id" ] = iterator-> first ;
42- jsonObject[" label" ] = iterator-> second .getLabel ();
43- jsonObject[" duration" ] = iterator-> second .getLastRecordedDuration ().count ();
41+ jsonObject[" id" ] = object. first ;
42+ jsonObject[" label" ] = object. second .getLabel ();
43+ jsonObject[" duration" ] = object. second .getLastRecordedDuration ().count ();
4444}
4545
4646template <>
47- std::string toJsonString<device::TaskCollection>(const device::TaskCollection &object )
47+ std::string toJsonString<device::TaskCollection>(const device::TaskCollection &container )
4848{
49- std::vector<device::TaskCollection::const_iterator> itList;
50- for (auto it = std::cbegin (object); it != std::cend (object); ++it)
51- {
52- itList.emplace_back (it);
53- }
54- nlohmann::json jsonObject (itList);
49+ nlohmann::json jsonObject (container);
5550 return jsonObject.dump (defaultJsonIndent);
5651}
5752
You can’t perform that action at this time.
0 commit comments