update modules

This commit is contained in:
2019-05-27 01:32:08 +07:00
parent 48a257f70d
commit 54bfb2d5ba
6 changed files with 9 additions and 19 deletions

View File

@@ -877,9 +877,7 @@ namespace ecs_hpp
namespace std
{
template <>
struct hash<ecs_hpp::entity> final
: std::unary_function<const ecs_hpp::entity&, std::size_t>
{
struct hash<ecs_hpp::entity> final {
std::size_t operator()(const ecs_hpp::entity& ent) const noexcept {
return ecs_hpp::detail::hash_combine(
std::hash<const ecs_hpp::registry*>()(&ent.owner()),
@@ -947,9 +945,7 @@ namespace ecs_hpp
namespace std
{
template <>
struct hash<ecs_hpp::const_entity> final
: std::unary_function<const ecs_hpp::const_entity&, std::size_t>
{
struct hash<ecs_hpp::const_entity> final {
std::size_t operator()(const ecs_hpp::const_entity& ent) const noexcept {
return ecs_hpp::detail::hash_combine(
std::hash<const ecs_hpp::registry*>()(&ent.owner()),
@@ -1020,9 +1016,7 @@ namespace ecs_hpp
namespace std
{
template < typename T >
struct hash<ecs_hpp::component<T>>
: std::unary_function<const ecs_hpp::component<T>&, std::size_t>
{
struct hash<ecs_hpp::component<T>> {
std::size_t operator()(const ecs_hpp::component<T>& comp) const noexcept {
return std::hash<ecs_hpp::entity>()(comp.owner());
}
@@ -1080,9 +1074,7 @@ namespace ecs_hpp
namespace std
{
template < typename T >
struct hash<ecs_hpp::const_component<T>>
: std::unary_function<const ecs_hpp::const_component<T>&, std::size_t>
{
struct hash<ecs_hpp::const_component<T>> {
std::size_t operator()(const ecs_hpp::const_component<T>& comp) const noexcept {
return std::hash<ecs_hpp::const_entity>()(comp.owner());
}

View File

@@ -1296,9 +1296,7 @@ namespace promise_hpp
namespace std
{
template < typename T >
struct hash<promise_hpp::promise<T>>
: std::unary_function<promise_hpp::promise<T>, std::size_t>
{
struct hash<promise_hpp::promise<T>> final {
std::size_t operator()(const promise_hpp::promise<T>& p) const noexcept {
return p.hash();
}