From: Mark Wielaard Date: Mon, 11 Oct 2010 15:26:43 +0000 (+0200) Subject: Use std:tr1::hash where possible. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75dfc809260802688613b806a1ea22fd3d3e20b5;p=thirdparty%2Felfutils.git Use std:tr1::hash where possible. * c++/subr.hh (string_hash_combine): Removed. (hash): Extend std::tr1::hash. * c++/dwarf_data (value_string): typedef std::tr1::hash hasher. --- diff --git a/libdw/ChangeLog b/libdw/ChangeLog index c80600350..f8f8017bf 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,10 @@ +2010-10-11 Mark Wielaard + + * c++/subr.hh (string_hash_combine): Removed. + (hash): Extend std::tr1::hash. + * c++/dwarf_data (value_string): typedef std::tr1::hash + hasher. + 2010-07-26 Roland McGrath * dwarf_getlocation_implicit_pointer.c: New file. diff --git a/libdw/c++/dwarf_data b/libdw/c++/dwarf_data index 2cc548bde..4a334b4cf 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 hasher; + typedef std::tr1::hash hasher; inline value_string () {} diff --git a/libdw/c++/subr.hh b/libdw/c++/subr.hh index fda1f2954..bb57538e7 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 struct base_hasher : public std::unary_function { @@ -147,7 +141,7 @@ namespace elfutils template<> struct hash - : public container_hasher + : public std::tr1::hash { };