]> Dogcows Code - chaz/yoink/blobdiff - src/moof/hash.hh
the massive refactoring effort
[chaz/yoink] / src / moof / hash.hh
similarity index 53%
rename from src/Moof/HashTools.hh
rename to src/moof/hash.hh
index 5bed739d069f749c37f47c16bc0bd1c46e690c38..27cc650147ab98c81a90b4a6ff57d08dab4cab66 100644 (file)
@@ -9,36 +9,44 @@
 *
 **************************************************************************/
 
-#ifndef _MOOF_HASHTOOLS_HH_
-#define _MOOF_HASHTOOLS_HH_
+#ifndef _MOOF_HASH_HH_
+#define _MOOF_HASH_HH_
+
+/**
+ * \file hash.hh
+ * Hash tables and functions.
+ */
 
 #include <string>
 
-#include <stlplus/hash.hpp>
+#include <moof/stlplus/hash.hpp>
+
+
+namespace moof {
 
 
-namespace Mf {
+using stlplus::hash;
 
 
-struct HashFunction
+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;
 
-       inline unsigned operator()(const std::string& val) const
+       unsigned operator () (const std::string& val) const
        {
                return (*this)(val.data(), val.length());
        }
 
-       inline unsigned operator()(int val) const
+       unsigned operator () (int val) const
        {
                return val;
        }
 };
 
 
-} // namespace Mf
+} // namespace moof
 
-#endif // _MOOF_HASHTOOLS_HH_
+#endif // _MOOF_HASH_HH_
 
This page took 0.021391 seconds and 4 git commands to generate.