mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-15 15:16:49 +02:00
changes from main repository
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// HashFunction.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/HashFunction.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/HashFunction.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Hashing
|
||||
@@ -60,6 +60,19 @@ struct HashFunction
|
||||
};
|
||||
|
||||
|
||||
//@ deprecated
|
||||
template <>
|
||||
struct HashFunction<std::string>
|
||||
/// A generic hash function.
|
||||
{
|
||||
UInt32 operator () (const std::string& key, UInt32 maxValue) const
|
||||
/// Returns the hash value for the given key.
|
||||
{
|
||||
return ((UInt32) hash(key)) % maxValue;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user