| 265 | CatalogModel::~CatalogModel() = default; |
| 266 | |
| 267 | std::vector<CatalogItem> CatalogModel::items() const { |
| 268 | std::vector<CatalogItem> items; |
| 269 | items.reserve(impl_->items.size()); |
| 270 | for (const auto& [key, item] : impl_->items) { |
| 271 | (void)key; |
| 272 | items.push_back(item); |
| 273 | } |
| 274 | std::sort(items.begin(), items.end(), catalogItemLess); |
| 275 | return items; |
| 276 | } |
| 277 | |
| 278 | bool CatalogModel::isEmpty() const noexcept { |
| 279 | return impl_->items.empty(); |