summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libdw/ChangeLog7
-rw-r--r--libdw/c++/dwarf_data2
-rw-r--r--libdw/c++/subr.hh8
3 files changed, 9 insertions, 8 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index c8060035..f8f8017b 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-11 Mark Wielaard <[email protected]>
+
+ * c++/subr.hh (string_hash_combine): Removed.
+ (hash<std::string>): Extend std::tr1::hash<std::string>.
+ * c++/dwarf_data (value_string): typedef std::tr1::hash<std::string>
+ hasher.
+
2010-07-26 Roland McGrath <[email protected]>
* dwarf_getlocation_implicit_pointer.c: New file.
diff --git a/libdw/c++/dwarf_data b/libdw/c++/dwarf_data
index 2cc548bd..4a334b4c 100644
--- a/libdw/c++/dwarf_data
+++ b/libdw/c++/dwarf_data
@@ -870,7 +870,7 @@ namespace elfutils
struct value_string : public value_dispatch, public std::string
{
- typedef subr::hash<std::string> hasher;
+ typedef std::tr1::hash<std::string> hasher;
inline value_string () {}
diff --git a/libdw/c++/subr.hh b/libdw/c++/subr.hh
index fda1f295..bb57538e 100644
--- a/libdw/c++/subr.hh
+++ b/libdw/c++/subr.hh
@@ -53,12 +53,6 @@ namespace elfutils
hash_combine (seed, v.second);
}
- inline void
- string_hash_combine (size_t &hash, const std::string::value_type &c)
- {
- hash = hash * 33 + c;
- }
-
template<typename T, typename B>
struct base_hasher : public std::unary_function<T, size_t>
{
@@ -147,7 +141,7 @@ namespace elfutils
template<>
struct hash<std::string>
- : public container_hasher<std::string, string_hash_combine, 5381>
+ : public std::tr1::hash<std::string>
{
};