mirror of
https://github.com/BlackMATov/ecs.hpp.git
synced 2025-12-16 22:19:21 +07:00
remove deprecated std::unary_function using
This commit is contained in:
@@ -877,9 +877,7 @@ namespace ecs_hpp
|
|||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
template <>
|
template <>
|
||||||
struct hash<ecs_hpp::entity> final
|
struct hash<ecs_hpp::entity> final {
|
||||||
: std::unary_function<const ecs_hpp::entity&, std::size_t>
|
|
||||||
{
|
|
||||||
std::size_t operator()(const ecs_hpp::entity& ent) const noexcept {
|
std::size_t operator()(const ecs_hpp::entity& ent) const noexcept {
|
||||||
return ecs_hpp::detail::hash_combine(
|
return ecs_hpp::detail::hash_combine(
|
||||||
std::hash<const ecs_hpp::registry*>()(&ent.owner()),
|
std::hash<const ecs_hpp::registry*>()(&ent.owner()),
|
||||||
@@ -947,9 +945,7 @@ namespace ecs_hpp
|
|||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
template <>
|
template <>
|
||||||
struct hash<ecs_hpp::const_entity> final
|
struct hash<ecs_hpp::const_entity> final {
|
||||||
: std::unary_function<const ecs_hpp::const_entity&, std::size_t>
|
|
||||||
{
|
|
||||||
std::size_t operator()(const ecs_hpp::const_entity& ent) const noexcept {
|
std::size_t operator()(const ecs_hpp::const_entity& ent) const noexcept {
|
||||||
return ecs_hpp::detail::hash_combine(
|
return ecs_hpp::detail::hash_combine(
|
||||||
std::hash<const ecs_hpp::registry*>()(&ent.owner()),
|
std::hash<const ecs_hpp::registry*>()(&ent.owner()),
|
||||||
@@ -1020,9 +1016,7 @@ namespace ecs_hpp
|
|||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
template < typename T >
|
template < typename T >
|
||||||
struct hash<ecs_hpp::component<T>>
|
struct hash<ecs_hpp::component<T>> {
|
||||||
: std::unary_function<const ecs_hpp::component<T>&, std::size_t>
|
|
||||||
{
|
|
||||||
std::size_t operator()(const ecs_hpp::component<T>& comp) const noexcept {
|
std::size_t operator()(const ecs_hpp::component<T>& comp) const noexcept {
|
||||||
return std::hash<ecs_hpp::entity>()(comp.owner());
|
return std::hash<ecs_hpp::entity>()(comp.owner());
|
||||||
}
|
}
|
||||||
@@ -1080,9 +1074,7 @@ namespace ecs_hpp
|
|||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
template < typename T >
|
template < typename T >
|
||||||
struct hash<ecs_hpp::const_component<T>>
|
struct hash<ecs_hpp::const_component<T>> {
|
||||||
: std::unary_function<const ecs_hpp::const_component<T>&, std::size_t>
|
|
||||||
{
|
|
||||||
std::size_t operator()(const ecs_hpp::const_component<T>& comp) const noexcept {
|
std::size_t operator()(const ecs_hpp::const_component<T>& comp) const noexcept {
|
||||||
return std::hash<ecs_hpp::const_entity>()(comp.owner());
|
return std::hash<ecs_hpp::const_entity>()(comp.owner());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user