diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-19 10:29:26 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-19 10:29:26 +0100 |
commit | c3c3476f1d82aa83d8f8dc706488475dc2cf1e55 (patch) | |
tree | 3ee5011a9b758c3b544e297977ad4ac79d830df0 /src/crepe/api | |
parent | 73598a9e7f49047d74ca439cb0f300099d8c03bf (diff) | |
parent | 5f39dc386cce357a7c71a81c523a90496f7b1e67 (diff) |
merge `loek/util`
Diffstat (limited to 'src/crepe/api')
-rw-r--r-- | src/crepe/api/Asset.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/crepe/api/Asset.h b/src/crepe/api/Asset.h index 05dccba..685dd3a 100644 --- a/src/crepe/api/Asset.h +++ b/src/crepe/api/Asset.h @@ -1,7 +1,6 @@ #pragma once #include <string> -#include <unordered_map> namespace crepe { @@ -52,7 +51,16 @@ private: namespace std { +//! Hash helper struct template<> struct hash<const crepe::Asset> { + /** + * \brief Hash operator for crepe::Asset + * + * This function hashes a crepe::Asset instance, allowing it to be used as a key in an \c + * std::unordered_map. + * + * \returns Hash value + */ size_t operator()(const crepe::Asset & asset) const noexcept; }; |