aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2010-03-03 01:23:07 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2010-03-03 01:23:07 +0000
commit055f6a476cc87ede98951518dc34f9a80c4f2ea2 (patch)
tree3329226f144f6bdb710d63d9991072e85c273791 /libstdc++-v3/src
parent273e719b286e24b5ae64983b7890f2d6af711955 (diff)
downloadgcc-055f6a476cc87ede98951518dc34f9a80c4f2ea2.zip
gcc-055f6a476cc87ede98951518dc34f9a80c4f2ea2.tar.gz
gcc-055f6a476cc87ede98951518dc34f9a80c4f2ea2.tar.bz2
functional_hash.h (_Fnv_hash_base<>::hash): Change to template.
2010-03-02 Paolo Carlini <paolo.carlini@oracle.com> * include/bits/functional_hash.h (_Fnv_hash_base<>::hash): Change to template. * include/tr1/functional_hash.h (_Fnv_hash_base<>::hash): Likewise. * include/bits/vector.tcc (hash): Adjust. * include/bits/basic_string.h (hash): Likewise. * include/std/bitset (hash): Likewise. * src/hash-string-aux.cc (hash): Likewise. From-SVN: r157185
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r--libstdc++-v3/src/hash-string-aux.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/libstdc++-v3/src/hash-string-aux.cc b/libstdc++-v3/src/hash-string-aux.cc
index b5a2c6d..711d7f4 100644
--- a/libstdc++-v3/src/hash-string-aux.cc
+++ b/libstdc++-v3/src/hash-string-aux.cc
@@ -37,18 +37,12 @@
template<>
size_t
hash<wstring>::operator()(wstring __s) const
- {
- const char* __p = reinterpret_cast<const char*>(__s.data());
- return _Fnv_hash::hash(__p, __s.length() * sizeof(wchar_t));
- }
+ { return _Fnv_hash::hash(__s.data(), __s.length() * sizeof(wchar_t)); }
template<>
size_t
hash<const wstring&>::operator()(const wstring& __s) const
- {
- const char* __p = reinterpret_cast<const char*>(__s.data());
- return _Fnv_hash::hash(__p, __s.length() * sizeof(wchar_t));
- }
+ { return _Fnv_hash::hash(__s.data(), __s.length() * sizeof(wchar_t)); }
#endif
#endif