Skip to content

Commit

Permalink
fix bugs on MacOS GCC 10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubpa committed Feb 22, 2021
1 parent fc56ee8 commit b7c6fba
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 35 deletions.
7 changes: 6 additions & 1 deletion include/UECS/AccessTypeID.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ namespace Ubpa::UECS {
using AccessTypeIDSet = std::set<AccessTypeID, std::less<>>;
}

#include "details/AccessTypeID.inl"
template<>
struct std::hash<Ubpa::UECS::AccessTypeID> {
constexpr std::size_t operator()(const Ubpa::UECS::AccessTypeID& id) const noexcept {
return id.GetValue();
}
};
7 changes: 6 additions & 1 deletion include/UECS/EntityQuery.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ namespace Ubpa::UECS {
};
}

#include "details/EntityQuery.inl"
template<>
struct std::hash<Ubpa::UECS::EntityQuery> {
std::size_t operator()(const Ubpa::UECS::EntityQuery& query) const noexcept {
return query.GetValue();
}
};
1 change: 1 addition & 0 deletions include/UECS/SystemTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <unordered_map>
#include <array>
#include <string>
#include <vector>

namespace Ubpa::UECS {
class World;
Expand Down
13 changes: 0 additions & 13 deletions include/UECS/details/AccessTypeID.inl

This file was deleted.

12 changes: 0 additions & 12 deletions include/UECS/details/EntityQuery.inl

This file was deleted.

14 changes: 6 additions & 8 deletions include/UECS/details/TypeIDSet.inl
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@ namespace Ubpa::UECS {
}
}

namespace std {
template<>
struct hash<Ubpa::UECS::TypeIDSet> {
std::size_t operator()(const Ubpa::UECS::TypeIDSet& types) const noexcept {
return types.GetValue();
}
};
}
template<>
struct std::hash<Ubpa::UECS::TypeIDSet> {
std::size_t operator()(const Ubpa::UECS::TypeIDSet& types) const noexcept {
return types.GetValue();
}
};

0 comments on commit b7c6fba

Please sign in to comment.