diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_asset_catalog.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_asset_catalog.hh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_asset_catalog.hh b/source/blender/blenkernel/BKE_asset_catalog.hh index 5fd68e33f4a..51cfa8452c0 100644 --- a/source/blender/blenkernel/BKE_asset_catalog.hh +++ b/source/blender/blenkernel/BKE_asset_catalog.hh @@ -32,6 +32,7 @@ #include <map> #include <memory> +#include <set> #include <string> namespace blender::bke { @@ -255,4 +256,16 @@ class AssetCatalog { static std::string sensible_simple_name_for_path(const CatalogPath &path); }; +struct AssetCatalogPathCmp { + bool operator()(const AssetCatalog *lhs, const AssetCatalog *rhs) const + { + if (lhs->path == rhs->path) { + return lhs->catalog_id < rhs->catalog_id; + } + return lhs->path < rhs->path; + } +}; + +using AssetCatalogOrderedSet = std::set<const AssetCatalog *, AssetCatalogPathCmp>; + } // namespace blender::bke |