entity/*: suppress some warnings here and there

This commit is contained in:
Michele Caini
2020-08-16 12:10:55 +02:00
parent 08cd8c95f7
commit ad262ea624
4 changed files with 5 additions and 5 deletions

View File

@@ -186,7 +186,7 @@ class basic_registry {
const auto index = type_index<Component>::value();
if(!(index < pools.size())) {
pools.resize(index+1);
pools.resize(size_type(index+1u));
}
if(auto &&pdata = pools[index]; !pdata.pool) {

View File

@@ -107,7 +107,7 @@ class sparse_set {
}
[[nodiscard]] reference operator[](const difference_type value) const {
const auto pos = size_type(index-value-1);
const auto pos = size_type(index-value-1u);
return (*packed)[pos];
}
@@ -136,7 +136,7 @@ class sparse_set {
}
[[nodiscard]] pointer operator->() const {
const auto pos = size_type(index-1);
const auto pos = size_type(index-1u);
return &(*packed)[pos];
}

View File

@@ -141,7 +141,7 @@ class storage: public sparse_set<Entity> {
}
[[nodiscard]] pointer operator->() const ENTT_NOEXCEPT {
const auto pos = size_type(index-1);
const auto pos = size_type(index-1u);
return &(*instances)[pos];
}

View File

@@ -255,7 +255,7 @@ class basic_view<Entity, exclude_t<Exclude...>, Component...> {
[[nodiscard]] unchecked_type unchecked(const sparse_set<Entity> *view) const {
std::size_t pos{};
unchecked_type other{};
((std::get<pool_type<Component> *>(pools) == view ? nullptr : (other[pos++] = std::get<pool_type<Component> *>(pools))), ...);
((std::get<pool_type<Component> *>(pools) == view ? nullptr : (other[pos] = std::get<pool_type<Component> *>(pools), other[pos++])), ...);
return other;
}