| 183 | } |
| 184 | |
| 185 | FieldMap::EntryList FieldMap::getEntries() const { |
| 186 | FieldMap::EntryList output; |
| 187 | |
| 188 | if (VALDI_UNLIKELY(_isMap)) { |
| 189 | forEachMap([&](const auto& entry) { |
| 190 | auto it = std::upper_bound( |
| 191 | output.begin(), output.end(), entry, [=](const FieldMap::Entry& a, const FieldMap::Entry& b) { |
| 192 | return a.number < b.number; |
| 193 | }); |
| 194 | |
| 195 | output.emplace(it, entry); |
| 196 | }); |
| 197 | } else { |
| 198 | forEachVec([&](const auto& entry) { output.emplace_back(entry); }); |
| 199 | } |
| 200 | |
| 201 | return output; |
| 202 | } |
| 203 | |
| 204 | bool FieldMap::isUsingMap() const { |
| 205 | return _isMap; |