Skip to content

Commit

Permalink
Use ordered map, appendData needs to insert data in order (#245)
Browse files Browse the repository at this point in the history
Otherwise the time order may not be respected and the data is loaded
incorrectly
  • Loading branch information
v-lopez authored and facontidavide committed Jan 28, 2020
1 parent 59ef84a commit c976ff3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/ROS/RosMsgParsers/pal_statistics_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ template<> struct Serializer< ::PalStatisticsValues_ >

//-----------------------------------------------------

static std::unordered_map<uint32_t, std::vector<std::string> > _stored_pal_statistics_names;
static std::map<uint32_t, std::vector<std::string> > _stored_pal_statistics_names;

class PalStatisticsNamesParser: public RosParserBase
{
Expand Down Expand Up @@ -157,7 +157,7 @@ class PalStatisticsValuesParser: public RosParserBase
}

private:
std::unordered_map<uint32_t, std::vector< PlotData > > _data;
std::map<uint32_t, std::vector< PlotData > > _data;

};

Expand Down

0 comments on commit c976ff3

Please sign in to comment.