*: removed pointless continue;

This commit is contained in:
Michele Caini
2021-09-17 23:44:15 +02:00
parent 80b5ed3d22
commit 04a9c80c14
5 changed files with 8 additions and 8 deletions

View File

@@ -386,7 +386,7 @@ public:
return create();
} else {
auto *it = &free_list;
for(; entity_traits::to_entity(*it) != req; it = &entities[entity_traits::to_entity(*it)]) { continue; }
for(; entity_traits::to_entity(*it) != req; it = &entities[entity_traits::to_entity(*it)]) {}
*it = entity_traits::combine(curr, entity_traits::to_integral(*it));
return (entities[req] = hint);
}

View File

@@ -83,7 +83,7 @@ class basic_runtime_view final {
}
view_iterator &operator++() {
while(++it != (*pools)[0]->end() && !valid()) { continue; }
while(++it != (*pools)[0]->end() && !valid()) {}
return *this;
}
@@ -93,7 +93,7 @@ class basic_runtime_view final {
}
view_iterator &operator--() ENTT_NOEXCEPT {
while(--it != (*pools)[0]->begin() && !valid()) { continue; }
while(--it != (*pools)[0]->begin() && !valid()) {}
return *this;
}

View File

@@ -756,7 +756,7 @@ public:
/*! @brief Removes all tombstones from the packed array of a sparse set. */
void compact() {
size_type next = count;
for(; next && packed[next - 1u] == tombstone; --next) { continue; }
for(; next && packed[next - 1u] == tombstone; --next) {}
for(auto *it = &free_list; *it != null && next; it = std::addressof(packed[entity_traits::to_entity(*it)])) {
if(const size_type pos = entity_traits::to_entity(*it); pos < next) {
@@ -766,7 +766,7 @@ public:
const auto entity = static_cast<typename entity_traits::entity_type>(pos);
sparse_ref(packed[pos]) = entity_traits::combine(entity, entity_traits::to_integral(packed[pos]));
*it = entity_traits::combine(static_cast<typename entity_traits::entity_type>(next), entity_traits::reserved);
for(; next && packed[next - 1u] == tombstone; --next) { continue; }
for(; next && packed[next - 1u] == tombstone; --next) {}
}
}

View File

@@ -137,7 +137,7 @@ public:
}
view_iterator &operator++() ENTT_NOEXCEPT {
while(++it != last && !valid()) { continue; }
while(++it != last && !valid()) {}
return *this;
}
@@ -147,7 +147,7 @@ public:
}
view_iterator &operator--() ENTT_NOEXCEPT {
while(--it != first && !valid()) { continue; }
while(--it != first && !valid()) {}
return *this;
}

View File

@@ -587,7 +587,7 @@ inline void meta_reset(const id_type id) ENTT_NOEXCEPT {
for(; *curr; *curr = std::exchange((*curr)->next, nullptr)) {
if constexpr(sizeof...(member) != 0u) {
static_assert(sizeof...(member) == 1u, "Assert in defense of the future me");
for(auto **sub = (&((*curr)->*member), ...); *sub; *sub = std::exchange((*sub)->next, nullptr)) { continue; }
for(auto **sub = (&((*curr)->*member), ...); *sub; *sub = std::exchange((*sub)->next, nullptr)) {}
}
}
};