Bugfix: 32-bit port

This commit is contained in:
Hrvoje Jasak 2015-10-25 16:49:58 +00:00
parent b7cacb6c10
commit a973bcf237

View file

@ -72,33 +72,9 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Hash specialization for hashing pointer addresses.
// Treat a pointer like a intptr_t.
// This should work for both 32-bit and 64-bit pointers.
template<>
class Hash<void*>
{
public:
Hash()
{}
unsigned operator()(const void* const& p, unsigned seed) const
{
return Hash<intptr_t>()(intptr_t(p), seed);
}
unsigned operator()(const void* const& p) const
{
return Hash<intptr_t>()(intptr_t(p));
}
};
//- Hash specialization for hashing labels
template<>
class Hash<Foam::label>
class Hash<label>
{
public:
@ -123,6 +99,30 @@ public:
};
//- Hash specialization for hashing pointer addresses.
// Treat a pointer like a intptr_t.
// This should work for both 32-bit and 64-bit pointers.
template<>
class Hash<void*>
{
public:
Hash()
{}
unsigned operator()(const void* const& p, unsigned seed) const
{
return Hash<intptr_t>()(intptr_t(p), seed);
}
unsigned operator()(const void* const& p) const
{
return Hash<intptr_t>()(intptr_t(p));
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam