ProtoBuf: Don't use maps, as these don't preserve order of elements
This commit is contained in:
@@ -703,13 +703,17 @@ JFJochProtoBuf::Plot JFJochReceiver::GetPlots(const JFJochProtoBuf::PlotRequest
|
||||
JFJochProtoBuf::RadialIntegrationProfiles JFJochReceiver::GetRadialIntegrationProfiles() {
|
||||
JFJochProtoBuf::RadialIntegrationProfiles ret;
|
||||
|
||||
auto &map = *ret.mutable_plots();
|
||||
if (rad_int_profile) {
|
||||
auto p = ret.add_profiles();
|
||||
p->set_title("dataset");
|
||||
rad_int_profile->GetPlot(*p->mutable_plot());
|
||||
}
|
||||
|
||||
if (rad_int_profile)
|
||||
rad_int_profile->GetPlot(map["dataset"]);
|
||||
|
||||
for (int i = 0; i < rad_int_profile_per_file.size(); i++)
|
||||
rad_int_profile_per_file[i]->GetPlot(map["file" + std::to_string(i)]);
|
||||
for (int i = 0; i < rad_int_profile_per_file.size(); i++) {
|
||||
auto p = ret.add_profiles();
|
||||
p->set_title("file" + std::to_string(i));
|
||||
rad_int_profile_per_file[i]->GetPlot(*p->mutable_plot());
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user