mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
workaround GCC < 7.0 bug
template specialization from namespace must be enclosed in the namespace https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
This commit is contained in:
parent
44174da9a2
commit
a5f9efb3df
@ -142,7 +142,9 @@ public:
|
|||||||
VCMI_LIB_NAMESPACE_END
|
VCMI_LIB_NAMESPACE_END
|
||||||
|
|
||||||
|
|
||||||
template <> struct std::hash<VCMI_LIB_WRAP_NAMESPACE(ResourceID)>
|
namespace std
|
||||||
|
{
|
||||||
|
template <> struct hash<VCMI_LIB_WRAP_NAMESPACE(ResourceID)>
|
||||||
{
|
{
|
||||||
size_t operator()(const VCMI_LIB_WRAP_NAMESPACE(ResourceID) & resourceIdent) const
|
size_t operator()(const VCMI_LIB_WRAP_NAMESPACE(ResourceID) & resourceIdent) const
|
||||||
{
|
{
|
||||||
@ -151,3 +153,4 @@ template <> struct std::hash<VCMI_LIB_WRAP_NAMESPACE(ResourceID)>
|
|||||||
return stringHasher(resourceIdent.getName()) ^ intHasher(static_cast<int>(resourceIdent.getType()));
|
return stringHasher(resourceIdent.getName()) ^ intHasher(static_cast<int>(resourceIdent.getType()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user