aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDesour <vorunbekannt75@web.de>2023-02-21 19:29:32 +0100
committersfan5 <sfan5@live.de>2023-02-22 11:43:42 +0100
commit09e6eeb65b03d0bec1dfbcc008bd57fd5cd5802c (patch)
tree4dcea4cb93d1776876f8d790f8e8470e11f3ee22 /include
parent839bdc1a658773ea9525bec547e2b887664a14ba (diff)
downloadirrlicht-09e6eeb65b03d0bec1dfbcc008bd57fd5cd5802c.tar.xz
Remove irr::core::hash
Its use of std::unary_function was deprecated. And it wasn't used anywhere.
Diffstat (limited to 'include')
-rw-r--r--include/irrUString.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/include/irrUString.h b/include/irrUString.h
index 5b2b857..8e553fd 100644
--- a/include/irrUString.h
+++ b/include/irrUString.h
@@ -3612,33 +3612,5 @@ inline std::wostream& operator<<(std::wostream& out, const ustring16& in)
return out;
}
-namespace unicode
-{
-
-//! Hashing algorithm for hashing a ustring. Used for things like unordered_maps.
-//! Algorithm taken from std::hash<std::string>.
-class hash : public std::unary_function<core::ustring, size_t>
-{
- public:
- size_t operator()(const core::ustring& s) const
- {
- size_t ret = 2166136261U;
- size_t index = 0;
- size_t stride = 1 + s.size_raw() / 10;
-
- core::ustring::const_iterator i = s.begin();
- while (i != s.end())
- {
- // TODO: Don't force u32 on an x64 OS. Make it agnostic.
- ret = 16777619U * ret ^ (size_t)s[(u32)index];
- index += stride;
- i += stride;
- }
- return (ret);
- }
-};
-
-} // end namespace unicode
-
} // end namespace core
} // end namespace irr