diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-05-25 11:12:31 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-05-25 11:12:31 +1000 |
commit | db42ccae717f175106491f7ff360ea6a0090d32b (patch) | |
tree | bdd1c93557216af10606e0ab3806fc445db8ce8a /source/base/StarAssets.hpp | |
parent | 19986b30a1724ebdda644427152575fd294a2dd8 (diff) |
fix Assets filesByExtension storing duplicate asset paths
slipped in with the asset load scripts - this caused rare duplication errors when the Databases parse assets by extension and an asset path is indexed with more than one capitalization
#66
Diffstat (limited to 'source/base/StarAssets.hpp')
-rw-r--r-- | source/base/StarAssets.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/base/StarAssets.hpp b/source/base/StarAssets.hpp index 54cbb2f..6b454e8 100644 --- a/source/base/StarAssets.hpp +++ b/source/base/StarAssets.hpp @@ -190,7 +190,7 @@ public: // Scans all assets for files with the given extension, which is specially // indexed and much faster than a normal scan. Extension may contain leading // '.' character or it may be omitted. - StringSet const& scanExtension(String const& extension) const; + CaseInsensitiveStringSet const& scanExtension(String const& extension) const; // Get json asset with an optional sub-path. The sub-path portion of the // path refers to a key in the top-level object, and may use dot notation @@ -204,7 +204,7 @@ public: // Load all the given jsons using background processing. void queueJsons(StringList const& paths) const; - void queueJsons(StringSet const& paths) const; + void queueJsons(CaseInsensitiveStringSet const& paths) const; // Returns *either* an image asset or a sub-frame. Frame files are JSON // descriptor files that reference a particular image and label separate @@ -216,7 +216,7 @@ public: ImageConstPtr image(AssetPath const& path) const; // Load images using background processing void queueImages(StringList const& paths) const; - void queueImages(StringSet const& paths) const; + void queueImages(CaseInsensitiveStringSet const& paths) const; // Return the given image *if* it is already loaded, otherwise queue it for // loading. ImageConstPtr tryImage(AssetPath const& path) const; @@ -231,7 +231,7 @@ public: AudioConstPtr audio(String const& path) const; // Load audios using background processing void queueAudios(StringList const& paths) const; - void queueAudios(StringSet const& paths) const; + void queueAudios(CaseInsensitiveStringSet const& paths) const; // Return the given audio *if* it is already loaded, otherwise queue it for // loading. AudioConstPtr tryAudio(String const& path) const; @@ -331,7 +331,7 @@ private: // Maps the source asset name to the source containing it CaseInsensitiveStringMap<AssetFileDescriptor> m_files; // Maps an extension to the files with that extension - CaseInsensitiveStringMap<StringSet> m_filesByExtension; + CaseInsensitiveStringMap<CaseInsensitiveStringSet> m_filesByExtension; ByteArray m_digest; |