mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-15 00:11:55 +07:00
remove std::unary_function using
This commit is contained in:
@@ -451,9 +451,7 @@ namespace e2d
|
||||
namespace std
|
||||
{
|
||||
template < typename T >
|
||||
struct hash<e2d::intrusive_ptr<T>> final
|
||||
: std::unary_function<e2d::intrusive_ptr<T>, std::size_t>
|
||||
{
|
||||
struct hash<e2d::intrusive_ptr<T>> final {
|
||||
std::size_t operator()(const e2d::intrusive_ptr<T>& p) const noexcept {
|
||||
return std::hash<T*>()(p.get());
|
||||
}
|
||||
|
||||
@@ -182,9 +182,7 @@ namespace e2d
|
||||
namespace std
|
||||
{
|
||||
template < typename Char >
|
||||
struct hash<e2d::basic_string_hash<Char>>
|
||||
: std::unary_function<e2d::basic_string_hash<Char>, std::size_t>
|
||||
{
|
||||
struct hash<e2d::basic_string_hash<Char>> {
|
||||
std::size_t operator()(e2d::basic_string_hash<Char> hs) const noexcept {
|
||||
return e2d::math::numeric_cast<std::size_t>(hs.hash());
|
||||
}
|
||||
|
||||
@@ -81,9 +81,7 @@ namespace e2d
|
||||
namespace std
|
||||
{
|
||||
template <>
|
||||
struct hash<e2d::url>
|
||||
: std::unary_function<e2d::url, std::size_t>
|
||||
{
|
||||
struct hash<e2d::url> {
|
||||
std::size_t operator()(const e2d::url& u) const noexcept {
|
||||
return e2d::math::numeric_cast<std::size_t>(
|
||||
e2d::utils::sdbm_hash(
|
||||
|
||||
Reference in New Issue
Block a user