]> Dogcows Code - chaz/yoink/blobdiff - src/moof/hash.hh
remove some unused stlplus modules
[chaz/yoink] / src / moof / hash.hh
index 27cc650147ab98c81a90b4a6ff57d08dab4cab66..8b14ac5596bc65957c3491f76dc49db2eaced093 100644 (file)
@@ -1,13 +1,11 @@
 
-/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+/*]  Copyright (c) 2009-2011, Charles McGarvey  [*****************************
 **]  All rights reserved.
 *
-* vi:ts=4 sw=4 tw=75
-*
 * Distributable under the terms and conditions of the 2-clause BSD license;
 * see the file COPYING for a complete text of the license.
 *
-**************************************************************************/
+*****************************************************************************/
 
 #ifndef _MOOF_HASH_HH_
 #define _MOOF_HASH_HH_
@@ -19,7 +17,7 @@
 
 #include <string>
 
-#include <moof/stlplus/hash.hpp>
+#include <stlplus/containers/hash.hpp>
 
 
 namespace moof {
@@ -27,21 +25,20 @@ namespace moof {
 
 using stlplus::hash;
 
-
 struct hash_function
 {
        // generic hash function
-       unsigned operator () (const void* key, int len,
-                                                 unsigned seed = -1) const;
+       unsigned operator () (const void* key, int len, unsigned seed = -1) const;
 
        unsigned operator () (const std::string& val) const
        {
                return (*this)(val.data(), val.length());
        }
 
-       unsigned operator () (int val) const
+       template <class T>
+       unsigned operator () (T val) const
        {
-               return val;
+               return static_cast<unsigned>(val);
        }
 };
 
This page took 0.01873 seconds and 4 git commands to generate.