summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-16 01:06:23 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-16 04:09:21 +0100
commit666f6deb47774ad101710f619fb9ac66514b3012 (patch)
tree3e68c1a91b9cc8f7a67ec6d5b729303f24fcd3af /src/core
parentFS.Archive: Clean up treatment of archives and their handles (diff)
downloadyuzu-666f6deb47774ad101710f619fb9ac66514b3012.tar
yuzu-666f6deb47774ad101710f619fb9ac66514b3012.tar.gz
yuzu-666f6deb47774ad101710f619fb9ac66514b3012.tar.bz2
yuzu-666f6deb47774ad101710f619fb9ac66514b3012.tar.lz
yuzu-666f6deb47774ad101710f619fb9ac66514b3012.tar.xz
yuzu-666f6deb47774ad101710f619fb9ac66514b3012.tar.zst
yuzu-666f6deb47774ad101710f619fb9ac66514b3012.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/fs/archive.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp
index a4ee7a156..caf82d556 100644
--- a/src/core/hle/service/fs/archive.cpp
+++ b/src/core/hle/service/fs/archive.cpp
@@ -16,6 +16,21 @@
#include "core/hle/kernel/session.h"
#include "core/hle/result.h"
+// Specializes std::hash for ArchiveIdCode, so that we can use it in std::unordered_map.
+// Workaroung for libstdc++ bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60970
+namespace std {
+ template <>
+ struct hash<Service::FS::ArchiveIdCode> {
+ typedef Service::FS::ArchiveIdCode argument_type;
+ typedef std::size_t result_type;
+
+ result_type operator()(const argument_type& id_code) const {
+ typedef std::underlying_type<argument_type>::type Type;
+ return std::hash<Type>()(static_cast<Type>(id_code));
+ }
+ };
+}
+
namespace Service {
namespace FS {