Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-09-30 17:34:30 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-09-30 17:34:30 +0300
commit42ce88f15cb77c859c6b2fed119934836235b961 (patch)
tree70e172eec5c348356060fecfd179a11ed54860f0 /source/blender/blenkernel/BKE_asset_catalog.hh
parent628fab696cfaefdd2ac758849c8a1e9a3a0beef0 (diff)
Cleanup: remove `CatalogPath` alias
The `CatalogPath` name was an alias for `std::string`, so that it could be easily switched over to something else. This happened in the previous commit (switched to `AssetCatalogPath`), so the alias is no longer necessary. This commit removes the `CatalogPath` alias. No functional changes.
Diffstat (limited to 'source/blender/blenkernel/BKE_asset_catalog.hh')
-rw-r--r--source/blender/blenkernel/BKE_asset_catalog.hh17
1 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_asset_catalog.hh b/source/blender/blenkernel/BKE_asset_catalog.hh
index c141ce5fca0..9d179011b25 100644
--- a/source/blender/blenkernel/BKE_asset_catalog.hh
+++ b/source/blender/blenkernel/BKE_asset_catalog.hh
@@ -40,7 +40,6 @@
namespace blender::bke {
using CatalogID = bUUID;
-using CatalogPath = AssetCatalogPath;
using CatalogPathComponent = std::string;
/* Would be nice to be able to use `std::filesystem::path` for this, but it's currently not
* available on the minimum macOS target version. */
@@ -99,11 +98,11 @@ class AssetCatalogService {
/** Return first catalog with the given path. Return nullptr if not found. This is not an
* efficient call as it's just a linear search over the catalogs. */
- AssetCatalog *find_catalog_by_path(const CatalogPath &path) const;
+ AssetCatalog *find_catalog_by_path(const AssetCatalogPath &path) const;
/** Create a catalog with some sensible auto-generated catalog ID.
* The catalog will be saved to the default catalog file.*/
- AssetCatalog *create_catalog(const CatalogPath &catalog_path);
+ AssetCatalog *create_catalog(const AssetCatalogPath &catalog_path);
/**
* Soft-delete the catalog, ensuring it actually gets deleted when the catalog definition file is
@@ -113,7 +112,7 @@ class AssetCatalogService {
/**
* Update the catalog path, also updating the catalog path of all sub-catalogs.
*/
- void update_catalog_path(CatalogID catalog_id, const CatalogPath &new_catalog_path);
+ void update_catalog_path(CatalogID catalog_id, const AssetCatalogPath &new_catalog_path);
AssetCatalogTree *get_catalog_tree();
@@ -173,7 +172,7 @@ class AssetCatalogTreeItem {
StringRef get_name() const;
/** Return the full catalog path, defined as the name of this catalog prefixed by the full
* catalog path of its parent and a separator. */
- CatalogPath catalog_path() const;
+ AssetCatalogPath catalog_path() const;
int count_parents() const;
bool has_children() const;
@@ -281,10 +280,10 @@ class AssetCatalogDefinitionFile {
class AssetCatalog {
public:
AssetCatalog() = default;
- AssetCatalog(CatalogID catalog_id, const CatalogPath &path, const std::string &simple_name);
+ AssetCatalog(CatalogID catalog_id, const AssetCatalogPath &path, const std::string &simple_name);
CatalogID catalog_id;
- CatalogPath path;
+ AssetCatalogPath path;
/**
* Simple, human-readable name for the asset catalog. This is stored on assets alongside the
* catalog ID; the catalog ID is a UUID that is not human-readable,
@@ -304,11 +303,11 @@ class AssetCatalog {
* NOTE: the given path will be cleaned up (trailing spaces removed, etc.), so the returned
* `AssetCatalog`'s path differ from the given one.
*/
- static std::unique_ptr<AssetCatalog> from_path(const CatalogPath &path);
+ static std::unique_ptr<AssetCatalog> from_path(const AssetCatalogPath &path);
protected:
/** Generate a sensible catalog ID for the given path. */
- static std::string sensible_simple_name_for_path(const CatalogPath &path);
+ static std::string sensible_simple_name_for_path(const AssetCatalogPath &path);
};
/** Comparator for asset catalogs, ordering by (path, UUID). */