diff --git a/src/data/array_index.cpp b/src/data/array_index.cpp index ec2849b..e0214c0 100644 --- a/src/data/array_index.cpp +++ b/src/data/array_index.cpp @@ -23,8 +23,10 @@ namespace MzPeak::Data { struct EntryCmpFn { bool operator()(const ArrayIndex::Entry& a, const ArrayIndex::Entry& b) const { - return a.array_name < b.array_name && a.array_type < b.array_type && - a.data_type < b.data_type && a.buffer_priority > b.buffer_priority; + if (a.array_name != b.array_name) return a.array_name < b.array_name; + if (a.array_type != b.array_type) return a.array_type < b.array_type; + if (a.data_type != b.data_type) return a.data_type < b.data_type; + return a.buffer_priority > b.buffer_priority; } }; diff --git a/src/schema/entity_type.cpp b/src/schema/entity_type.cpp index 741c01f..215a3c0 100644 --- a/src/schema/entity_type.cpp +++ b/src/schema/entity_type.cpp @@ -23,7 +23,7 @@ std::string entity_type_to_string(EntityType::Type t) case Chromatogram: return "chromatogram"; case WavelengthSpectrum: - return "wavelength spectrum"; + return "wavelength_spectrum"; } std::unreachable(); @@ -38,7 +38,7 @@ EntityType::value_type entity_type_from_string(std::string_view s) return Spectrum; } else if (s == "chromatogram") { return Chromatogram; - } else if (s == "wavelength spectrum") { + } else if (s == "wavelength_spectrum") { return WavelengthSpectrum; } else { return std::string(s);